test # Conflicts: # mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.javarelease
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import javax.persistence.Transient; | |||
| import java.util.List; | |||
| @@ -7,6 +9,7 @@ import javax.persistence.Id; | |||
| import java.io.Serializable; | |||
| @Table(name = "mall_permission") | |||
| @Data | |||
| public class MallPermission implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -17,176 +20,68 @@ public class MallPermission implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*权限名称[LIKE]**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="权限名称[LIKE]",name="name") | |||
| @io.swagger.annotations.ApiModelProperty(value="权限名称",name="name") | |||
| private String name; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value="权限名称[LIKE]",name="nameLike") | |||
| private String nameLike; | |||
| /*是否可用 Y/N**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="是否可用 Y/N",name="available") | |||
| private String available; | |||
| /*父编号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="父编号",name="parentId") | |||
| private Long parentId; | |||
| /*父编号列表**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="父编号列表",name="parentIds") | |||
| private String parentIds; | |||
| /*权限字符串[LIST]**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="权限字符串[LIST]",name="permission") | |||
| @io.swagger.annotations.ApiModelProperty(value="父编号ID,一级菜单为0",name="parentId") | |||
| private Long parentId; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value="父菜单",name="parentName") | |||
| private String parentName; | |||
| @io.swagger.annotations.ApiModelProperty(value="是否可用 Y/N",name="permission") | |||
| private String available; | |||
| @io.swagger.annotations.ApiModelProperty(value="授权(多个用逗号分隔,如:user:list,user:create)",name="permission") | |||
| private String permission; | |||
| @Transient | |||
| private List<String> permissions; | |||
| /*资源类型0菜单 1,按钮**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="资源类型0菜单 1,按钮",name="resourceType") | |||
| private String resourceType; | |||
| /*资源路径**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="资源路径",name="url") | |||
| @io.swagger.annotations.ApiModelProperty(value="资源类型0:目录 1:菜单 2:按钮",name="resourceType") | |||
| private Integer resourceType; | |||
| @io.swagger.annotations.ApiModelProperty(value="菜单背景色-1级菜单使用",name="moduleColor") | |||
| private String moduleColor; | |||
| @io.swagger.annotations.ApiModelProperty(value="菜单字体颜色-1级菜单使用",name="moduleColorNum") | |||
| private String moduleColorNum; | |||
| @io.swagger.annotations.ApiModelProperty(value="资源路径(user/list or http://localhost/1.html)",name="url") | |||
| private String url; | |||
| /*排序[FROM][TO][GTE][GT][LTE][LT]**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="排序[FROM][TO][GTE][GT][LTE][LT]",name="sort") | |||
| @io.swagger.annotations.ApiModelProperty(value="菜单图标",name="icon") | |||
| private String icon; | |||
| @io.swagger.annotations.ApiModelProperty(value="版本类型(1:标准版)",name="versionType") | |||
| private Integer versionType; | |||
| @io.swagger.annotations.ApiModelProperty(value="排序",name="sort") | |||
| private Integer sort; | |||
| @Transient | |||
| private Integer sortFrom; | |||
| @Transient | |||
| private Integer sortTo; | |||
| @Transient | |||
| private Integer sortGte; | |||
| @Transient | |||
| private Integer sortGt; | |||
| @Transient | |||
| private Integer sortLte; | |||
| @Transient | |||
| private Integer sortLt; | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String _name) { | |||
| name = _name; | |||
| } | |||
| public String getNameLike() { | |||
| return nameLike; | |||
| } | |||
| public void setNameLike( String _nameLike) { | |||
| nameLike = _nameLike; | |||
| } | |||
| public String getAvailable() { | |||
| return available; | |||
| } | |||
| public void setAvailable(String _available) { | |||
| available = _available; | |||
| } | |||
| public Long getParentId() { | |||
| return parentId; | |||
| } | |||
| public void setParentId(Long _parentId) { | |||
| parentId = _parentId; | |||
| } | |||
| public String getParentIds() { | |||
| return parentIds; | |||
| } | |||
| public void setParentIds(String _parentIds) { | |||
| parentIds = _parentIds; | |||
| } | |||
| public String getPermission() { | |||
| return permission; | |||
| } | |||
| public void setPermission(String _permission) { | |||
| permission = _permission; | |||
| } | |||
| public List<String> getPermissions() { | |||
| return permissions; | |||
| } | |||
| public void setPermissions( List<String> _permissions) { | |||
| permissions = _permissions; | |||
| } | |||
| public String getResourceType() { | |||
| return resourceType; | |||
| } | |||
| public void setResourceType(String _resourceType) { | |||
| resourceType = _resourceType; | |||
| } | |||
| public String getUrl() { | |||
| return url; | |||
| } | |||
| public void setUrl(String _url) { | |||
| url = _url; | |||
| } | |||
| public Integer getSort() { | |||
| return sort; | |||
| } | |||
| public void setSort(Integer _sort) { | |||
| sort = _sort; | |||
| } | |||
| public Integer getSortFrom() { | |||
| return sortFrom; | |||
| } | |||
| public void setSortFrom( Integer _sortFrom) { | |||
| sortFrom = _sortFrom; | |||
| } | |||
| public Integer getSortTo() { | |||
| return sortTo; | |||
| } | |||
| public void setSortTo( Integer _sortTo) { | |||
| sortTo = _sortTo; | |||
| } | |||
| public Integer getSortGte() { | |||
| return sortGte; | |||
| } | |||
| public void setSortGte( Integer _sortGte) { | |||
| sortGte = _sortGte; | |||
| } | |||
| public Integer getSortGt() { | |||
| return sortGt; | |||
| } | |||
| public void setSortGt( Integer _sortGt) { | |||
| sortGt = _sortGt; | |||
| } | |||
| public Integer getSortLte() { | |||
| return sortLte; | |||
| } | |||
| public void setSortLte( Integer _sortLte) { | |||
| sortLte = _sortLte; | |||
| } | |||
| public Integer getSortLt() { | |||
| return sortLt; | |||
| } | |||
| public void setSortLt( Integer _sortLt) { | |||
| sortLt = _sortLt; | |||
| } | |||
| @Transient | |||
| private Integer sortFrom; | |||
| @Transient | |||
| private Integer sortTo; | |||
| @Transient | |||
| private Integer sortGte; | |||
| @Transient | |||
| private Integer sortGt; | |||
| @Transient | |||
| private Integer sortLte; | |||
| @Transient | |||
| private Integer sortLt; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value="子菜单",name="children") | |||
| private List<?> children; | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| ,Name_ASC("`name` ASC"),Name_DESC("`name` DESC") | |||
| ,ParentId_ASC("`parent_id` ASC"),ParentId_DESC("`parent_id` DESC") | |||
| ,Available_ASC("`available` ASC"),Available_DESC("`available` DESC") | |||
| ,ParentId_ASC("`parentId` ASC"),ParentId_DESC("`parentId` DESC") | |||
| ,ParentIds_ASC("`parentIds` ASC"),ParentIds_DESC("`parentIds` DESC") | |||
| ,Permission_ASC("`permission` ASC"),Permission_DESC("`permission` DESC") | |||
| ,ResourceType_ASC("`resourceType` ASC"),ResourceType_DESC("`resourceType` DESC") | |||
| ,ResourceType_ASC("`resource_type` ASC"),ResourceType_DESC("`resource_type` DESC") | |||
| ,ModuleColor_ASC("`module_color` ASC"),ModuleColor_DESC("`module_color` DESC") | |||
| ,ModuleColorNum_ASC("`module_color_num` ASC"),ModuleColorNum_DESC("`module_color_num` DESC") | |||
| ,Url_ASC("`url` ASC"),Url_DESC("`url` DESC") | |||
| ,Icon_ASC("`icon` ASC"),Icon_DESC("`icon` DESC") | |||
| ,VersionType_ASC("`version_type` ASC"),VersionType_DESC("`version_type` DESC") | |||
| ,Sort_ASC("`sort` ASC"),Sort_DESC("`sort` DESC") | |||
| ; | |||
| private String value; | |||
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import javax.persistence.Transient; | |||
| import java.util.List; | |||
| @@ -7,6 +9,7 @@ import javax.persistence.Id; | |||
| import java.io.Serializable; | |||
| @Table(name = "mall_role") | |||
| @Data | |||
| public class MallRole implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -17,79 +20,19 @@ public class MallRole implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /*角色名称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="角色名称",name="name") | |||
| private String name; | |||
| /*是否可用 0可用 1不可用**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="是否可用 0可用 1不可用",name="available") | |||
| private String available; | |||
| /*角色描述**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="角色描述",name="description") | |||
| private String description; | |||
| @Transient | |||
| @io.swagger.annotations.ApiModelProperty(value="权限列表",name="menus") | |||
| private String menus; | |||
| public String getMenus() { | |||
| return menus; | |||
| } | |||
| public void setMenus(String menus) { | |||
| this.menus = menus; | |||
| } | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String _name) { | |||
| name = _name; | |||
| } | |||
| public String getAvailable() { | |||
| return available; | |||
| } | |||
| public void setAvailable(String _available) { | |||
| available = _available; | |||
| } | |||
| public String getDescription() { | |||
| return description; | |||
| } | |||
| public void setDescription(String _description) { | |||
| description = _description; | |||
| } | |||
| public static enum Field | |||
| { | |||
| @@ -24,50 +24,21 @@ public class MallUserInfo implements Serializable { | |||
| protected List<String> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<String> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<String> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /**租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /**登录用户名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="登录用户名",name="username") | |||
| private String username; | |||
| /**用户名称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户名称",name="name") | |||
| private String name; | |||
| /**密码**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="密码",name="password") | |||
| private String password; | |||
| /**创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||
| private Date createTime; | |||
| /**最后登录时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="最后登录时间",name="lastLoginTime") | |||
| private Date lastLoginTime; | |||
| /**1:有效,0:禁止登录**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="1:有效,0:禁止登录",name="status") | |||
| private Integer status; | |||
| /**0 不是超管 1是超管**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="0 不是超管 1是超管",name="isAdmin") | |||
| private Integer isAdmin; | |||
| @io.swagger.annotations.ApiModelProperty(value="昵称",name="nickName") | |||
| @@ -104,122 +75,9 @@ public class MallUserInfo implements Serializable { | |||
| @Transient | |||
| private String captcha; | |||
| /**1合同审批 2账单审批**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="1合同审批 2账单审批",name="flowPermission") | |||
| private String flowPermission; | |||
| public String getFlowPermission() { | |||
| return flowPermission; | |||
| } | |||
| public void setFlowPermission(String flowPermission) { | |||
| this.flowPermission = flowPermission; | |||
| } | |||
| public String getMenus() { | |||
| return menus; | |||
| } | |||
| public void setMenus(String menus) { | |||
| this.menus = menus; | |||
| } | |||
| public String getRoleName() { | |||
| return roleName; | |||
| } | |||
| public void setRoleName(String roleName) { | |||
| this.roleName = roleName; | |||
| } | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public String getUsername() { | |||
| return username; | |||
| } | |||
| public void setUsername(String _username) { | |||
| username = _username; | |||
| } | |||
| public String getName() { | |||
| return name; | |||
| } | |||
| public void setName(String _name) { | |||
| name = _name; | |||
| } | |||
| public String getPassword() { | |||
| return password; | |||
| } | |||
| public void setPassword(String _password) { | |||
| password = _password; | |||
| } | |||
| public Date getCreateTime() { | |||
| return createTime; | |||
| } | |||
| public void setCreateTime(Date _createTime) { | |||
| createTime = _createTime; | |||
| } | |||
| public Date getLastLoginTime() { | |||
| return lastLoginTime; | |||
| } | |||
| public void setLastLoginTime(Date _lastLoginTime) { | |||
| lastLoginTime = _lastLoginTime; | |||
| } | |||
| public Integer getStatus() { | |||
| return status; | |||
| } | |||
| public void setStatus(Integer _status) { | |||
| status = _status; | |||
| } | |||
| public Integer getIsAdmin() { | |||
| return isAdmin; | |||
| } | |||
| public void setIsAdmin(Integer _isAdmin) { | |||
| isAdmin = _isAdmin; | |||
| } | |||
| public List<MallRole> getRole() { | |||
| return role; | |||
| } | |||
| public void setRole(List<MallRole> role) { | |||
| this.role = role; | |||
| } | |||
| public List<MallPermission> getPermission() { | |||
| return permission; | |||
| } | |||
| public void setPermission(List<MallPermission> permission) { | |||
| this.permission = permission; | |||
| } | |||
| public String getNickName() { | |||
| return nickName; | |||
| } | |||
| public void setNickName(String nickName) { | |||
| this.nickName = nickName; | |||
| } | |||
| public Long getRoleId() { | |||
| return roleId; | |||
| } | |||
| public void setRoleId(Long roleId) { | |||
| this.roleId = roleId; | |||
| } | |||
| public String getCaptcha() { | |||
| return captcha; | |||
| } | |||
| public void setCaptcha(String captcha) { | |||
| this.captcha = captcha; | |||
| } | |||
| public Integer getWithWechat() { | |||
| if(StringUtils.isNotBlank(this.webOpenId)) { | |||
| this.withWechat = EnumUserWechat.HAD.getCode(); | |||
| @@ -229,34 +87,6 @@ public class MallUserInfo implements Serializable { | |||
| return this.withWechat; | |||
| } | |||
| public void setWithWechat(Integer withWechat) { | |||
| this.withWechat = withWechat; | |||
| } | |||
| public String getPhone() { | |||
| return phone; | |||
| } | |||
| public void setPhone(String phone) { | |||
| this.phone = phone; | |||
| } | |||
| public String getBopenId() { | |||
| return bopenId; | |||
| } | |||
| public void setBopenId(String bopenId) { | |||
| this.bopenId = bopenId; | |||
| } | |||
| public String getWebOpenId() { | |||
| return webOpenId; | |||
| } | |||
| public void setWebOpenId(String webOpenId) { | |||
| this.webOpenId = webOpenId; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.Id; | |||
| import javax.persistence.Table; | |||
| import javax.persistence.Transient; | |||
| @@ -8,6 +10,7 @@ import java.util.Date; | |||
| import java.util.List; | |||
| @Table(name = "wx_appinfo") | |||
| @Data | |||
| public class WxAppinfo implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -18,63 +21,29 @@ public class WxAppinfo implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /*小程序ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") | |||
| private String appId; | |||
| /*公众号ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="公众号ID",name="parentAppId") | |||
| private String parentAppId; | |||
| /*小程序名**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序名",name="name") | |||
| private String name; | |||
| /*小程序secret**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序secret",name="secret") | |||
| private String secret; | |||
| /*消息token**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="消息token",name="token") | |||
| private String token; | |||
| /*消息aeskey**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="消息aeskey",name="aesKey") | |||
| private String aesKey; | |||
| /*消息类型**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="消息类型",name="msgDataFormat") | |||
| private String msgDataFormat; | |||
| /*微信访问token**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信访问token",name="accessToken") | |||
| private String accessToken; | |||
| /*上次生成accesstoken时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="上次生成accesstoken时间",name="lastTokenTime") | |||
| private Date lastTokenTime; | |||
| /*微信token有效时间单位(秒)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信token有效时间单位(秒)",name="expiresIn") | |||
| private Integer expiresIn; | |||
| /*支付ID,参看wx_pay_account**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付ID,参看wx_pay_account",name="payId") | |||
| private Long payId; | |||
| @io.swagger.annotations.ApiModelProperty(value="1-B端 2-C端 3-服务号 4-订阅号",name="type") | |||
| @@ -2,6 +2,7 @@ package com.iformall.domain.po; | |||
| import com.fasterxml.jackson.annotation.JsonIgnoreProperties; | |||
| import com.iformall.utils.Constant; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| @@ -13,6 +14,7 @@ import java.io.Serializable; | |||
| @Table(name = "wx_c_user") | |||
| @JsonIgnoreProperties(ignoreUnknown = true) | |||
| @Data | |||
| public class WxCUser implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -24,114 +26,62 @@ public class WxCUser implements Serializable { | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /*微信openId**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信openId",name="openId") | |||
| private String openId; | |||
| /*微信unionId**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信unionId",name="unionId") | |||
| private String unionId; | |||
| /*用户昵称**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户昵称",name="nickName") | |||
| private String nickName; | |||
| /*用户性别**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户性别",name="gender") | |||
| private Integer gender; | |||
| /*用户头像地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户头像地址",name="avatarUrl") | |||
| private String avatarUrl; | |||
| /*用户绑定的手机号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户绑定的手机号",name="phone") | |||
| private String phone; | |||
| /*用户没有区号的手机号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户没有区号的手机号",name="purePhone") | |||
| private String purePhone; | |||
| /*用户所在城市**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在城市",name="city") | |||
| private String city; | |||
| /*用户所在省份**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在省份",name="province") | |||
| private String province; | |||
| /*用户所在语言**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户所在语言",name="language") | |||
| private String language; | |||
| /*用户手机区号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户手机区号",name="countryCode") | |||
| private String countryCode; | |||
| /*用户注册IP**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户注册IP",name="registerIp") | |||
| private String registerIp; | |||
| /***/ | |||
| @io.swagger.annotations.ApiModelProperty(value="",name="verifyCodePhone") | |||
| private String verifyCodePhone; | |||
| /*注册时记录用户扫码渠道,如朋友圈广告**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="注册时记录用户扫码渠道,如朋友圈广告",name="qrcodeSource") | |||
| private String qrcodeSource; | |||
| /*二维码来源,小程序**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="二维码来源,小程序",name="scene") | |||
| private String scene; | |||
| /*渠道,小程序**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="渠道,小程序",name="sceneAddress") | |||
| private String sceneAddress; | |||
| /*session key for 微信小程序**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="session key for 微信小程序",name="sessionKey") | |||
| private String sessionKey; | |||
| /*成长值**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="成长值",name="score") | |||
| private Integer score; | |||
| /*更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| /*创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /*小程序的appId**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序的appId",name="appId") | |||
| private String appId; | |||
| /*用户登录用token**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户登录用token",name="token") | |||
| private String token; | |||
| /*用户过期时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户过期时间",name="expireTime") | |||
| private Date expireTime; | |||
| /*经度**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="经度",name="longitude") | |||
| private BigDecimal longitude; | |||
| /*纬度**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="纬度",name="latitude") | |||
| private BigDecimal latitude; | |||
| /*登录次数**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="登录次数",name="loginCount") | |||
| private Integer loginCount; | |||
| /*附加信息**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="附加信息",name="extraInfo") | |||
| private String extraInfo; | |||
| /**是否关注公众号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="是否关注公众号",name="isSubscribe") | |||
| private Integer isSubscribe; | |||
| @@ -175,319 +125,6 @@ public class WxCUser implements Serializable { | |||
| @Transient | |||
| protected Date endDate; | |||
| public Date getStartDate() { | |||
| return startDate; | |||
| } | |||
| public void setStartDate(Date startDate) { | |||
| this.startDate = startDate; | |||
| } | |||
| public Date getEndDate() { | |||
| return endDate; | |||
| } | |||
| public void setEndDate(Date endDate) { | |||
| this.endDate = endDate; | |||
| } | |||
| public List<String> getSceneList() { | |||
| return sceneList; | |||
| } | |||
| public void setSceneList(List<String> sceneList) { | |||
| this.sceneList = sceneList; | |||
| } | |||
| public String getChannelName() { | |||
| return channelName; | |||
| } | |||
| public void setChannelName(String channelName) { | |||
| this.channelName = channelName; | |||
| } | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public String getOpenId() { | |||
| return openId; | |||
| } | |||
| public void setOpenId(String _openId) { | |||
| openId = _openId; | |||
| } | |||
| public String getUnionId() { | |||
| return unionId; | |||
| } | |||
| public void setUnionId(String _unionId) { | |||
| unionId = _unionId; | |||
| } | |||
| public String getNickName() { | |||
| return nickName; | |||
| } | |||
| public void setNickName(String _nickName) { | |||
| nickName = _nickName; | |||
| } | |||
| public Integer getGender() { | |||
| return gender; | |||
| } | |||
| public void setGender(Integer _gender) { | |||
| gender = _gender; | |||
| } | |||
| public String getAvatarUrl() { | |||
| return avatarUrl; | |||
| } | |||
| public void setAvatarUrl(String _avatarUrl) { | |||
| avatarUrl = _avatarUrl; | |||
| } | |||
| public String getPhone() { | |||
| return phone; | |||
| } | |||
| public void setPhone(String _phone) { | |||
| phone = _phone; | |||
| } | |||
| public String getPurePhone() { | |||
| return purePhone; | |||
| } | |||
| public void setPurePhone(String _purePhone) { | |||
| purePhone = _purePhone; | |||
| } | |||
| public String getCity() { | |||
| return city; | |||
| } | |||
| public void setCity(String _city) { | |||
| city = _city; | |||
| } | |||
| public String getProvince() { | |||
| return province; | |||
| } | |||
| public void setProvince(String _province) { | |||
| province = _province; | |||
| } | |||
| public String getLanguage() { | |||
| return language; | |||
| } | |||
| public void setLanguage(String _language) { | |||
| language = _language; | |||
| } | |||
| public String getCountryCode() { | |||
| return countryCode; | |||
| } | |||
| public void setCountryCode(String _countryCode) { | |||
| countryCode = _countryCode; | |||
| } | |||
| public String getRegisterIp() { | |||
| return registerIp; | |||
| } | |||
| public void setRegisterIp(String _registerIp) { | |||
| registerIp = _registerIp; | |||
| } | |||
| public String getVerifyCodePhone() { | |||
| return verifyCodePhone; | |||
| } | |||
| public void setVerifyCodePhone(String _verifyCodePhone) { | |||
| verifyCodePhone = _verifyCodePhone; | |||
| } | |||
| public String getQrcodeSource() { | |||
| return qrcodeSource; | |||
| } | |||
| public void setQrcodeSource(String _qrcodeSource) { | |||
| qrcodeSource = _qrcodeSource; | |||
| } | |||
| public String getScene() { | |||
| return scene; | |||
| } | |||
| public void setScene(String _scene) { | |||
| scene = _scene; | |||
| } | |||
| public String getSceneAddress() { | |||
| return sceneAddress; | |||
| } | |||
| public void setSceneAddress(String _sceneAddress) { | |||
| sceneAddress = _sceneAddress; | |||
| } | |||
| public String getSessionKey() { | |||
| return sessionKey; | |||
| } | |||
| public void setSessionKey(String _sessionKey) { | |||
| sessionKey = _sessionKey; | |||
| } | |||
| public Integer getScore() { | |||
| return score; | |||
| } | |||
| public void setScore(Integer _score) { | |||
| score = _score; | |||
| } | |||
| public Date getUpdateDate() { | |||
| return updateDate; | |||
| } | |||
| public void setUpdateDate(Date _updateDate) { | |||
| updateDate = _updateDate; | |||
| } | |||
| public Date getCreateDate() { | |||
| return createDate; | |||
| } | |||
| public void setCreateDate(Date _createDate) { | |||
| createDate = _createDate; | |||
| } | |||
| public String getAppId() { | |||
| return appId; | |||
| } | |||
| public void setAppId(String _appId) { | |||
| appId = _appId; | |||
| } | |||
| public String getToken() { | |||
| return token; | |||
| } | |||
| public void setToken(String _token) { | |||
| token = _token; | |||
| } | |||
| public Date getExpireTime() { | |||
| return expireTime; | |||
| } | |||
| public void setExpireTime(Date _expireTime) { | |||
| expireTime = _expireTime; | |||
| } | |||
| public BigDecimal getLongitude() { | |||
| return longitude; | |||
| } | |||
| public void setLongitude(BigDecimal longitude) { | |||
| this.longitude = longitude; | |||
| } | |||
| public BigDecimal getLatitude() { | |||
| return latitude; | |||
| } | |||
| public void setLatitude(BigDecimal latitude) { | |||
| this.latitude = latitude; | |||
| } | |||
| public Integer getLoginCount() { | |||
| return loginCount; | |||
| } | |||
| public void setLoginCount(Integer loginCount) { | |||
| this.loginCount = loginCount; | |||
| } | |||
| public String getSceneDescription() { | |||
| return sceneDescription; | |||
| } | |||
| public void setSceneDescription(String sceneDescription) { | |||
| this.sceneDescription = sceneDescription; | |||
| } | |||
| public String getExtraInfo() { | |||
| return extraInfo; | |||
| } | |||
| public void setExtraInfo(String extraInfo) { | |||
| this.extraInfo = extraInfo; | |||
| } | |||
| public Integer getIsSubscribe() { | |||
| return isSubscribe; | |||
| } | |||
| public void setIsSubscribe(Integer isSubscribe) { | |||
| this.isSubscribe = isSubscribe; | |||
| } | |||
| public String getOpenAppId() { | |||
| return openAppId; | |||
| } | |||
| public void setOpenAppId(String openAppId) { | |||
| this.openAppId = openAppId; | |||
| } | |||
| public String getMpOpenId() { | |||
| return mpOpenId; | |||
| } | |||
| public void setMpOpenId(String mpOpenId) { | |||
| this.mpOpenId = mpOpenId; | |||
| } | |||
| public String getMpAppId() { | |||
| return mpAppId; | |||
| } | |||
| public void setMpAppId(String mpAppId) { | |||
| this.mpAppId = mpAppId; | |||
| } | |||
| public Integer getMpSubscribe() { | |||
| return mpSubscribe; | |||
| } | |||
| public void setMpSubscribe(Integer mpSubscribe) { | |||
| this.mpSubscribe = mpSubscribe; | |||
| } | |||
| public Date getMpSubscribeTime() { | |||
| return mpSubscribeTime; | |||
| } | |||
| public void setMpSubscribeTime(Date mpSubscribeTime) { | |||
| this.mpSubscribeTime = mpSubscribeTime; | |||
| } | |||
| public String getMpSubscribeScene() { | |||
| return mpSubscribeScene; | |||
| } | |||
| public void setMpSubscribeScene(String mpSubscribeScene) { | |||
| this.mpSubscribeScene = mpSubscribeScene; | |||
| } | |||
| public String getSubsOpenId() { | |||
| return subsOpenId; | |||
| } | |||
| public void setSubsOpenId(String subsOpenId) { | |||
| this.subsOpenId = subsOpenId; | |||
| } | |||
| public String getSubsAppId() { | |||
| return subsAppId; | |||
| } | |||
| public void setSubsAppId(String subsAppId) { | |||
| this.subsAppId = subsAppId; | |||
| } | |||
| public Integer getSubsSubscribe() { | |||
| return subsSubscribe; | |||
| } | |||
| public void setSubsSubscribe(Integer subsSubscribe) { | |||
| this.subsSubscribe = subsSubscribe; | |||
| } | |||
| public Date getSubsSubscribeTime() { | |||
| return subsSubscribeTime; | |||
| } | |||
| public void setSubsSubscribeTime(Date subsSubscribeTime) { | |||
| this.subsSubscribeTime = subsSubscribeTime; | |||
| } | |||
| public String getSubsSubscribeScene() { | |||
| return subsSubscribeScene; | |||
| } | |||
| public void setSubsSubscribeScene(String subsSubscribeScene) { | |||
| this.subsSubscribeScene = subsSubscribeScene; | |||
| } | |||
| public static enum Field | |||
| { | |||
| Id_ASC("`id` ASC"),Id_DESC("`id` DESC") | |||
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import javax.persistence.Transient; | |||
| import java.util.List; | |||
| @@ -7,6 +9,7 @@ import javax.persistence.Id; | |||
| import java.io.Serializable; | |||
| @Table(name = "wx_pay_account") | |||
| @Data | |||
| public class WxPayAccount implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -17,130 +20,26 @@ public class WxPayAccount implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /*租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /**微信商户号/特约服务商号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信商户号/特约服务商号",name="mchId") | |||
| private String mchId; | |||
| /**微信服务商号*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务商号",name="subMchId") | |||
| private String subMchId; | |||
| @io.swagger.annotations.ApiModelProperty(value="微信服务商号",name="parentMchId") | |||
| private String parentMchId; | |||
| /**支付密钥**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付密钥",name="apiKey") | |||
| private String apiKey; | |||
| /**微信回调,支持3种回调,(1.url/pay 2.url/refund3.url/separate)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信回调,支持3种回调,(1.url/pay 2.url/refund3.url/separate)",name="notifyUrl") | |||
| private String notifyUrl; | |||
| /**证书本地存放位置**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="证书本地存放位置",name="certPath") | |||
| private String certPath; | |||
| /**商户模式**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="商户模式-0:普通商户模式1:服务商模式",name="type") | |||
| private Integer type; | |||
| /**是否开启分账**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="0:未开启分账1:开启分账",name="type") | |||
| private Integer share; | |||
| /**手续费**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="手续费",name="rate") | |||
| private Integer rate; | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String tenantId) { | |||
| this.tenantId = tenantId; | |||
| } | |||
| public String getMchId() { | |||
| return mchId; | |||
| } | |||
| public void setMchId(String _mchId) { | |||
| mchId = _mchId; | |||
| } | |||
| public String getSubMchId() { | |||
| return subMchId; | |||
| } | |||
| public void setSubMchId(String subMchId) { | |||
| this.subMchId = subMchId; | |||
| } | |||
| public String getParentMchId() { | |||
| return parentMchId; | |||
| } | |||
| public void setParentMchId(String parentMchId) { | |||
| this.parentMchId = parentMchId; | |||
| } | |||
| public String getApiKey() { | |||
| return apiKey; | |||
| } | |||
| public void setApiKey(String _apiKey) { | |||
| apiKey = _apiKey; | |||
| } | |||
| public String getNotifyUrl() { | |||
| return notifyUrl; | |||
| } | |||
| public void setNotifyUrl(String _notifyUrl) { | |||
| notifyUrl = _notifyUrl; | |||
| } | |||
| public String getCertPath() { | |||
| return certPath; | |||
| } | |||
| public void setCertPath(String _certPath) { | |||
| certPath = _certPath; | |||
| } | |||
| public Integer getType() { | |||
| return type; | |||
| } | |||
| public void setType(Integer type) { | |||
| this.type = type; | |||
| } | |||
| public Integer getShare() { | |||
| return share; | |||
| } | |||
| public void setShare(Integer share) { | |||
| this.share = share; | |||
| } | |||
| public Integer getRate() { | |||
| return rate; | |||
| } | |||
| public void setRate(Integer rate) { | |||
| this.rate = rate; | |||
| } | |||
| public String getPayNotifyUrl() { | |||
| return notifyUrl + "/pay"; | |||
| } | |||
| @@ -1,5 +1,7 @@ | |||
| package com.iformall.domain.po; | |||
| import lombok.Data; | |||
| import javax.persistence.*; | |||
| import java.util.*; | |||
| import javax.persistence.Transient; | |||
| @@ -8,6 +10,7 @@ import javax.persistence.Id; | |||
| import java.io.Serializable; | |||
| @Table(name = "wx_pay_order") | |||
| @Data | |||
| public class WxPayOrder implements Serializable { | |||
| private static final long serialVersionUID = 1L; | |||
| @@ -18,224 +21,47 @@ public class WxPayOrder implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| public Long getId() { | |||
| return id; | |||
| } | |||
| public void setId(Long id) { | |||
| this.id = id; | |||
| } | |||
| public String getSortColumns() { | |||
| return sortColumns; | |||
| } | |||
| public List<Long> getIds() { | |||
| return ids; | |||
| } | |||
| public void setIds(List<Long> ids) { | |||
| this.ids = ids; | |||
| } | |||
| /**租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /**创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createTime") | |||
| private Date createTime; | |||
| /**更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateTime") | |||
| private Date updateTime; | |||
| /**订单ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="订单ID",name="orderId") | |||
| private Long orderId; | |||
| /**用户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="用户ID",name="cUserId") | |||
| private Long cUserId; | |||
| /**B端用户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="B端用户ID",name="bUserId") | |||
| private Long bUserId; | |||
| /**扫码授权编码**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="扫码授权编码",name="authCode") | |||
| private String authCode; | |||
| /**ip地址**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="ip地址",name="ip") | |||
| private String ip; | |||
| /**支付金额(分)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付金额(分)",name="payAmount") | |||
| private Integer payAmount; | |||
| /**支付发起时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付发起时间",name="payTimeStart") | |||
| private Date payTimeStart; | |||
| /**支付结束时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付结束时间",name="payTimeEnd") | |||
| private Date payTimeEnd; | |||
| /**微信预支付交易会话标识**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信预支付交易会话标识",name="prepayId") | |||
| private String prepayId; | |||
| /**微信生成的订单号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="微信生成的订单号",name="transactionId") | |||
| private String transactionId; | |||
| /**支付渠道: 0-微信 1-支付宝 2-银联 **/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付渠道: 0-微信 1-支付宝 2-银联 ",name="payVendor") | |||
| private Integer payVendor; | |||
| /**支付订单号**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付订单号",name="payOrderNo") | |||
| private String payOrderNo; | |||
| /**支付状态: 0-支付中;1-支付成功;2-支付失败**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付状态: 0-支付中;1-支付成功;2-支付失败",name="payOrderStatus") | |||
| private Integer payOrderStatus; | |||
| /**分账状态: 0-未分账;1-分账**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账状态: 0-未分账;1-分账",name="payOrderStatus") | |||
| private Integer share; | |||
| /**分账金额(总金额扣除手续费后的金额)**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="分账金额",name="shareAmount") | |||
| @io.swagger.annotations.ApiModelProperty(value="分账金额(总金额扣除手续费后的金额)",name="shareAmount") | |||
| private Integer shareAmount; | |||
| /**支付失败原因**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="支付失败原因",name="failReason") | |||
| private String failReason; | |||
| @io.swagger.annotations.ApiModelProperty(value="支付后结果来源(0:callback, 1:query)",name="payEndFrom") | |||
| private Integer payEndFrom; | |||
| public String getTenantId() { | |||
| return tenantId; | |||
| } | |||
| public void setTenantId(String _tenantId) { | |||
| tenantId = _tenantId; | |||
| } | |||
| public Date getCreateTime() { | |||
| return createTime; | |||
| } | |||
| public void setCreateTime(Date _createTime) { | |||
| createTime = _createTime; | |||
| } | |||
| public Date getUpdateTime() { | |||
| return updateTime; | |||
| } | |||
| public void setUpdateTime(Date _updateTime) { | |||
| updateTime = _updateTime; | |||
| } | |||
| public Long getOrderId() { | |||
| return orderId; | |||
| } | |||
| public void setOrderId(Long _orderId) { | |||
| orderId = _orderId; | |||
| } | |||
| public Long getcUserId() { | |||
| return cUserId; | |||
| } | |||
| public void setcUserId(Long cUserId) { | |||
| this.cUserId = cUserId; | |||
| } | |||
| public Long getbUserId() { | |||
| return bUserId; | |||
| } | |||
| public void setbUserId(Long bUserId) { | |||
| this.bUserId = bUserId; | |||
| } | |||
| public String getAuthCode() { | |||
| return authCode; | |||
| } | |||
| public void setAuthCode(String authCode) { | |||
| this.authCode = authCode; | |||
| } | |||
| public String getIp() { | |||
| return ip; | |||
| } | |||
| public void setIp(String _ip) { | |||
| ip = _ip; | |||
| } | |||
| public Integer getPayAmount() { | |||
| return payAmount; | |||
| } | |||
| public void setPayAmount(Integer _payAmount) { | |||
| payAmount = _payAmount; | |||
| } | |||
| public Date getPayTimeStart() { | |||
| return payTimeStart; | |||
| } | |||
| public void setPayTimeStart(Date _payTimeStart) { | |||
| payTimeStart = _payTimeStart; | |||
| } | |||
| public Date getPayTimeEnd() { | |||
| return payTimeEnd; | |||
| } | |||
| public void setPayTimeEnd(Date _payTimeEnd) { | |||
| payTimeEnd = _payTimeEnd; | |||
| } | |||
| public String getPrepayId() { | |||
| return prepayId; | |||
| } | |||
| public void setPrepayId(String prepayId) { | |||
| this.prepayId = prepayId; | |||
| } | |||
| public String getTransactionId() { | |||
| return transactionId; | |||
| } | |||
| public void setTransactionId(String _transactionId) { | |||
| transactionId = _transactionId; | |||
| } | |||
| public Integer getPayVendor() { | |||
| return payVendor; | |||
| } | |||
| public void setPayVendor(Integer _payVendor) { | |||
| payVendor = _payVendor; | |||
| } | |||
| public String getPayOrderNo() { | |||
| return payOrderNo; | |||
| } | |||
| public void setPayOrderNo(String _payOrderNo) { | |||
| payOrderNo = _payOrderNo; | |||
| } | |||
| public Integer getPayOrderStatus() { | |||
| return payOrderStatus; | |||
| } | |||
| public void setPayOrderStatus(Integer _payOrderStatus) { | |||
| payOrderStatus = _payOrderStatus; | |||
| } | |||
| public Integer getShare() { | |||
| return share; | |||
| } | |||
| public void setShare(Integer share) { | |||
| this.share = share; | |||
| } | |||
| public Integer getShareAmount() { | |||
| return shareAmount; | |||
| } | |||
| public void setShareAmount(Integer shareAmount) { | |||
| this.shareAmount = shareAmount; | |||
| } | |||
| public String getFailReason() { | |||
| return failReason; | |||
| } | |||
| public void setFailReason(String _failReason) { | |||
| failReason = _failReason; | |||
| } | |||
| public Integer getPayEndFrom() { | |||
| return payEndFrom; | |||
| } | |||
| public void setPayEndFrom(Integer payEndFrom) { | |||
| this.payEndFrom = payEndFrom; | |||
| } | |||
| public static enum Field | |||
| { | |||
| @@ -21,21 +21,15 @@ public class WxTemplateMsg implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| /**租户ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId") | |||
| private String tenantId; | |||
| /**模板ID**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="模板ID",name="templateId") | |||
| private String templateId; | |||
| /**模板类型1:核销成功消息, 2:核销失败消息**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="模板类型1:核销成功消息,2:核销失败消息",name="type") | |||
| private Integer type; | |||
| /**创建时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /**更新时间**/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| @@ -20,26 +20,19 @@ public class WxWeappBasicSet implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| /**小程序类型(1-B端 2-C端)*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type") | |||
| private Integer type; | |||
| /**部署类型(1:dev,2:test,3:prod)*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="部署类型(1:dev,2:test,3:prod)",name="deploy") | |||
| private Integer deploy; | |||
| /**服务器域名*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="服务器域名",name="domainUrl") | |||
| private String domainUrl; | |||
| /**小程序基础版本*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序基础版本",name="version") | |||
| private String version; | |||
| /**模板库信息*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="模板库信息",name="templateInfo") | |||
| private String templateInfo; | |||
| /**创建时间*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /**更新时间*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| @@ -20,26 +20,19 @@ public class WxWeappExtSet implements Serializable { | |||
| protected List<Long> ids; | |||
| @Transient | |||
| protected String sortColumns; | |||
| /**小程序ID*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId") | |||
| private String appId; | |||
| /**小程序类型(1-B端 2-C端)*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type") | |||
| private Integer type; | |||
| /**小程序扩展信息*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序扩展信息",name="extJson") | |||
| private String extJson; | |||
| /**提交审核列表*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="提交审核列表",name="releaseJson") | |||
| private String releaseJson; | |||
| /**提交审核列表*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="停车(0:不支持,1:etcp)",name="carSupport") | |||
| private Integer carSupport; | |||
| /**创建时间*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate") | |||
| private Date createDate; | |||
| /**更新时间*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate") | |||
| private Date updateDate; | |||
| @@ -1,7 +1,13 @@ | |||
| package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class MallUserInfoVo extends MallUserInfo { | |||
| @io.swagger.annotations.ApiModelProperty(value="商场名",name="mallName") | |||
| private String mallName; | |||
| @@ -11,36 +17,4 @@ public class MallUserInfoVo extends MallUserInfo { | |||
| private String imgUrl; | |||
| @io.swagger.annotations.ApiModelProperty(value="商场图标",name="imgUrlH") | |||
| private String imgUrlH; | |||
| public String getMallName() { | |||
| return mallName; | |||
| } | |||
| public void setMallName(String mallName) { | |||
| this.mallName = mallName; | |||
| } | |||
| public String getMallGroup() { | |||
| return mallGroup; | |||
| } | |||
| public void setMallGroup(String mallGroup) { | |||
| this.mallGroup = mallGroup; | |||
| } | |||
| public String getImgUrl() { | |||
| return imgUrl; | |||
| } | |||
| public void setImgUrl(String _imgUrl) { | |||
| this.imgUrl = _imgUrl; | |||
| } | |||
| public String getImgUrlH() { | |||
| return imgUrlH; | |||
| } | |||
| public void setImgUrlH(String imgUrlH) { | |||
| this.imgUrlH = imgUrlH; | |||
| } | |||
| } | |||
| @@ -1,7 +1,13 @@ | |||
| package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.WxPayOrder; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxPayOrderVo extends WxPayOrder { | |||
| @io.swagger.annotations.ApiModelProperty(value="用户绑定的openId",name="openId") | |||
| @@ -3,12 +3,13 @@ package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.WxWeappAuditStatus; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxWeappAuditStatusVo extends WxWeappAuditStatus { | |||
| /**小程序名称*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序名称",name="name") | |||
| private String name; | |||
| } | |||
| @@ -3,12 +3,13 @@ package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.WxWeappCodeStatus; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxWeappCodeStatusVo extends WxWeappCodeStatus { | |||
| /**小程序名称*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序名称",name="name") | |||
| private String name; | |||
| } | |||
| @@ -3,11 +3,13 @@ package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.WxAuthorizerInfo; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxWeappInfo extends WxAuthorizerInfo { | |||
| @@ -3,12 +3,13 @@ package com.iformall.domain.vo; | |||
| import com.iformall.domain.po.WxWeappReleaseStatus; | |||
| import lombok.Data; | |||
| import lombok.EqualsAndHashCode; | |||
| import lombok.ToString; | |||
| @Data | |||
| @ToString(callSuper = true) | |||
| @EqualsAndHashCode(callSuper = true) | |||
| public class WxWeappReleaseStatusVo extends WxWeappReleaseStatus { | |||
| /**小程序名称*/ | |||
| @io.swagger.annotations.ApiModelProperty(value="小程序名称",name="name") | |||
| private String name; | |||
| } | |||
| @@ -99,21 +99,23 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| record.setUpdateTime(curDate); | |||
| // 授权表 添加 | |||
| authorizerInfoMapper.insertSelective(record); | |||
| if(appinfo.getType().equals(EnumAppType.C.getCode()) || | |||
| appinfo.getType().equals(EnumAppType.B.getCode())) { | |||
| // C/B 扩展配置表添加 | |||
| WxWeappExtSet weappExtSet = new WxWeappExtSet(); | |||
| weappExtSet.setId(record.getId()); | |||
| weappExtSet.setAppId(record.getAuthorizerAppid()); | |||
| if (appinfo.getType().equals(EnumAppType.C.getCode())) { | |||
| weappExtSet.setCarSupport(EnumCarSupport.NOCAR.getCode()); | |||
| if(appinfo.getType() != null) { | |||
| if (appinfo.getType().equals(EnumAppType.C.getCode()) || | |||
| appinfo.getType().equals(EnumAppType.B.getCode())) { | |||
| // C/B 扩展配置表添加 | |||
| WxWeappExtSet weappExtSet = new WxWeappExtSet(); | |||
| weappExtSet.setId(record.getId()); | |||
| weappExtSet.setAppId(record.getAuthorizerAppid()); | |||
| if (appinfo.getType().equals(EnumAppType.C.getCode())) { | |||
| weappExtSet.setCarSupport(EnumCarSupport.NOCAR.getCode()); | |||
| } | |||
| if (appinfo != null) { | |||
| weappExtSet.setType(appinfo.getType()); | |||
| } | |||
| weappExtSet.setCreateDate(curDate); | |||
| weappExtSet.setUpdateDate(curDate); | |||
| weappExtSetMapper.insertSelective(weappExtSet); | |||
| } | |||
| if (appinfo != null) { | |||
| weappExtSet.setType(appinfo.getType()); | |||
| } | |||
| weappExtSet.setCreateDate(curDate); | |||
| weappExtSet.setUpdateDate(curDate); | |||
| weappExtSetMapper.insertSelective(weappExtSet); | |||
| } | |||
| } else { | |||
| record.setId(authorizerInfo.getId()); | |||
| @@ -141,7 +143,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| info.setBaseStatus(record.getBaseStatus()); | |||
| info.setBaseTime(curDate); | |||
| info.setUpdateTime(curDate); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(record); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(info); | |||
| } | |||
| @Override | |||
| @@ -152,7 +154,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| info.setDomainStatus(record.getDomainStatus()); | |||
| info.setDomainTime(curDate); | |||
| info.setUpdateTime(curDate); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(record); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(info); | |||
| } | |||
| @Override | |||
| @@ -163,7 +165,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| info.setWebdomainStatus(record.getWebdomainStatus()); | |||
| info.setWebdomainTime(curDate); | |||
| info.setUpdateTime(curDate); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(record); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(info); | |||
| } | |||
| @Override | |||
| @@ -174,7 +176,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| info.setTemplateStatus(record.getTemplateStatus()); | |||
| info.setTemplateTime(curDate); | |||
| info.setUpdateTime(curDate); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(record); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(info); | |||
| } | |||
| @Override | |||
| @@ -184,7 +186,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService { | |||
| info.setId(record.getId()); | |||
| info.setOpenAppid(record.getOpenAppid()); | |||
| info.setBindOpenTime(curDate); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(record); | |||
| return authorizerInfoMapper.updateByPrimaryKeySelective(info); | |||
| } | |||
| @Override | |||
| @@ -131,6 +131,7 @@ public class ShiroConfig { | |||
| // 第三方平台 | |||
| filterChainDefinitionMap.put("/wxOpen/**", "anon"); | |||
| filterChainDefinitionMap.put("/wx/**", "anon"); | |||
| filterChainDefinitionMap.put("/wxCardIO/**", "anon"); | |||
| // filterChainDefinitionMap.put("/role/**", "corsFilter,token"); | |||
| @@ -4,6 +4,7 @@ import com.google.code.kaptcha.Constants; | |||
| import com.google.code.kaptcha.Producer; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.MallUserInfo; | |||
| import com.iformall.exception.MallinkException; | |||
| import com.iformall.shiro.UserSession; | |||
| @@ -7,6 +7,7 @@ import com.google.gson.Gson; | |||
| import com.google.gson.GsonBuilder; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.enums.*; | |||
| import com.iformall.service.*; | |||
| @@ -1,6 +1,7 @@ | |||
| package com.iformall.controller; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.service.WxAuthorizerInfoService; | |||
| import com.iformall.service.wechat.FmOpenService; | |||
| import io.swagger.annotations.Api; | |||
| @@ -23,7 +24,6 @@ import java.io.BufferedInputStream; | |||
| import java.io.File; | |||
| import java.io.FileOutputStream; | |||
| import java.io.InputStream; | |||
| import java.util.UUID; | |||
| /** | |||
| * Stormeye Wu | |||
| @@ -3,6 +3,7 @@ package com.iformall.controller; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxWeappBasicSet; | |||
| import com.iformall.service.WxWeappBasicSetService; | |||
| import io.swagger.annotations.Api; | |||
| @@ -5,6 +5,7 @@ import com.alibaba.fastjson.JSONObject; | |||
| import com.github.pagehelper.PageInfo; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxWeappExtSet; | |||
| import com.iformall.enums.EnumAppType; | |||
| @@ -2,7 +2,6 @@ package com.iformall.controller; | |||
| import cn.binarywang.wx.miniapp.api.WxMaService; | |||
| import cn.binarywang.wx.miniapp.bean.template.WxMaTemplateAddResult; | |||
| import cn.binarywang.wx.miniapp.bean.template.WxMaTemplateListResult; | |||
| import com.alibaba.fastjson.JSON; | |||
| import com.alibaba.fastjson.JSONArray; | |||
| import com.alibaba.fastjson.JSONObject; | |||
| @@ -13,6 +12,7 @@ import com.google.gson.reflect.TypeToken; | |||
| import com.iformall.common.ErrorCode; | |||
| import com.iformall.common.Result; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.*; | |||
| import com.iformall.domain.vo.WxWeappAuditStatusVo; | |||
| import com.iformall.domain.vo.WxWeappCodeStatusVo; | |||
| @@ -1,4 +1,4 @@ | |||
| package com.iformall.controller; | |||
| package com.iformall.controller.base; | |||
| import com.iformall.utils.IPUtil; | |||
| import org.springframework.web.bind.WebDataBinder; | |||
| @@ -0,0 +1,377 @@ | |||
| package com.iformall.controller.card; | |||
| import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.service.wechat.FmOpenService; | |||
| import io.swagger.annotations.Api; | |||
| import io.swagger.annotations.ApiOperation; | |||
| import me.chanjar.weixin.common.api.WxConsts; | |||
| import me.chanjar.weixin.common.error.WxErrorException; | |||
| import me.chanjar.weixin.mp.api.WxMpService; | |||
| import me.chanjar.weixin.mp.bean.card.*; | |||
| import me.chanjar.weixin.mp.bean.kefu.WxMpKefuMessage; | |||
| import me.chanjar.weixin.mp.bean.membercard.WxMpMemberCardCreateMessage; | |||
| import me.chanjar.weixin.mp.bean.membercard.WxMpMemberCardUpdateMessage; | |||
| import me.chanjar.weixin.mp.bean.membercard.WxMpMemberCardUpdateResult; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| import org.springframework.beans.factory.annotation.Autowired; | |||
| import org.springframework.web.bind.annotation.GetMapping; | |||
| import org.springframework.web.bind.annotation.PathVariable; | |||
| import org.springframework.web.bind.annotation.RequestMapping; | |||
| import org.springframework.web.bind.annotation.RestController; | |||
| import java.util.ArrayList; | |||
| import java.util.List; | |||
| @RestController | |||
| @RequestMapping("wxCardIO") | |||
| @Api(description = "微信卡券接口") | |||
| public class WxCardController extends BaseController { | |||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | |||
| @Autowired | |||
| private FmOpenService openService; | |||
| @ApiOperation("创建卡券") | |||
| @GetMapping("createCard/{appId}") | |||
| public ResultData createCard(@PathVariable String appId, String type) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::createCard"); | |||
| BaseInfo base = new BaseInfo(); | |||
| base.setLogoUrl("http://mmbiz.qpic.cn/mmbiz_png/2kbqxXJ9VM94Uq1YAsZDPKcWnNIOU4lv2PJmgIf1HIicldDibj2xcXjwSeqI7ZTfUj0wOokFmurO6gA7ppzF0pug/0?wx_fmt=png"); | |||
| base.setBrandName("测试优惠券"); | |||
| base.setCodeType("CODE_TYPE_QRCODE"); | |||
| base.setTitle("测试标题"); | |||
| base.setColor("Color010"); | |||
| base.setNotice("测试Notice"); | |||
| base.setServicePhone("020-88888888"); | |||
| base.setDescription("不可与其他优惠同享\\n如需团购券发票,请在消费时向商户提出\\n店内均可使用,仅限堂食"); | |||
| DateInfo info = new DateInfo(); | |||
| info.setType("DATE_TYPE_FIX_TERM"); | |||
| info.setFixedBeginTerm(0); | |||
| info.setFixedTerm(30); | |||
| base.setDateInfo(info); | |||
| Sku sku = new Sku(); | |||
| sku.setQuantity(100); | |||
| base.setSku(sku); | |||
| base.setGetLimit(1); | |||
| base.setCanShare(true); | |||
| base.setCanGiveFriend(true); | |||
| base.setUseAllLocations(true); | |||
| base.setCenterTitle("顶部居中按钮"); | |||
| base.setCenterSubTitle("按钮下方的wording"); | |||
| base.setCenterUrl("www.qq.com"); | |||
| base.setCustomUrl("http://www.qq.com"); | |||
| base.setCustomUrlName("立即使用"); | |||
| base.setCustomUrlSubTitle("副标题tip"); | |||
| base.setPromotionUrlName("更多优惠"); | |||
| base.setPromotionUrl("http://www.qq.com"); | |||
| base.setLocationIdList("1234"); | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| if (type.equalsIgnoreCase("groupon")) { | |||
| //团购券 | |||
| WxMpCardCreateMessage grouponMessage = new WxMpCardCreateMessage(); | |||
| GrouponCardCreateRequest grouponCardCreateRequest = new GrouponCardCreateRequest(); | |||
| GrouponCard grouponCard = new GrouponCard(); | |||
| grouponCard.setBaseInfo(base); | |||
| grouponCard.setDealDetail("deal detail"); | |||
| grouponCardCreateRequest.setGroupon(grouponCard); | |||
| grouponMessage.setCardCreateRequest(grouponCardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getCardService().createCard(grouponMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("cash")) { | |||
| //现金券 | |||
| WxMpCardCreateMessage cashMessage = new WxMpCardCreateMessage(); | |||
| CashCardCreateRequest cashCardCreateRequest = new CashCardCreateRequest(); | |||
| CashCard cashCard = new CashCard(); | |||
| cashCard.setBaseInfo(base); | |||
| cashCard.setLeastCost(1000); | |||
| cashCard.setReduceCost(100); | |||
| cashCardCreateRequest.setCash(cashCard); | |||
| cashMessage.setCardCreateRequest(cashCardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getCardService().createCard(cashMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("discount")) { | |||
| //折扣券 | |||
| WxMpCardCreateMessage discountMessage = new WxMpCardCreateMessage(); | |||
| DiscountCardCreateRequest discountCardCreateRequest = new DiscountCardCreateRequest(); | |||
| DiscountCard discountCard = new DiscountCard(); | |||
| discountCard.setBaseInfo(base); | |||
| discountCard.setDiscount(30); | |||
| discountCardCreateRequest.setDiscount(discountCard); | |||
| discountMessage.setCardCreateRequest(discountCardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getCardService().createCard(discountMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("gift")) { | |||
| //兑换券 | |||
| WxMpCardCreateMessage giftMessage = new WxMpCardCreateMessage(); | |||
| GiftCardCreateRequest giftCardCreateRequest = new GiftCardCreateRequest(); | |||
| GiftCard giftCard = new GiftCard(); | |||
| giftCard.setBaseInfo(base); | |||
| giftCard.setGift("星巴克雪瑞纳咖啡大杯"); | |||
| giftCardCreateRequest.setGift(giftCard); | |||
| giftMessage.setCardCreateRequest(giftCardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getCardService().createCard(giftMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("generalcard")) { | |||
| //普通兑换券 | |||
| WxMpCardCreateMessage generalMessage = new WxMpCardCreateMessage(); | |||
| GeneralCardCreateRequest generalCardCreateRequest = new GeneralCardCreateRequest(); | |||
| GeneralCard generalCard = new GeneralCard(); | |||
| generalCard.setBaseInfo(base); | |||
| generalCard.setDefaultDetail("音乐木盒"); | |||
| generalCardCreateRequest.setGeneralCoupon(generalCard); | |||
| generalMessage.setCardCreateRequest(generalCardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getCardService().createCard(generalMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("membercard")) { | |||
| //会员卡 | |||
| WxMpMemberCardCreateMessage createMessage = new WxMpMemberCardCreateMessage(); | |||
| MemberCardCreateRequest cardCreateRequest = new MemberCardCreateRequest(); | |||
| MemberCard memberCard = new MemberCard(); | |||
| memberCard.setPrerogative("特权说明"); | |||
| //激活方式 | |||
| memberCard.setAutoActivate(true);//自动激活 | |||
| // memberCard.setActivateUrl("http://www.qq.com"); | |||
| // memberCard.setWxActivate(false);//微信激活 | |||
| memberCard.setSupplyBonus(true); | |||
| memberCard.setSupplyBalance(false); | |||
| memberCard.setBackgroundPicUrl(null); | |||
| memberCard.setDiscount(0); | |||
| BaseInfo baseInfo = new BaseInfo(); | |||
| baseInfo.setLogoUrl("http://mmbiz.qpic.cn/mmbiz_png/2kbqxXJ9VM94Uq1YAsZDPKcWnNIOU4lv2PJmgIf1HIicldDibj2xcXjwSeqI7ZTfUj0wOokFmurO6gA7ppzF0pug/0?wx_fmt=png"); | |||
| baseInfo.setCodeType("CODE_TYPE_QRCODE"); | |||
| baseInfo.setBrandName("金泸科技"); | |||
| baseInfo.setTitle("铂金用户贵宾卡"); | |||
| baseInfo.setColor("Color010"); | |||
| baseInfo.setNotice("卡券使用提醒"); | |||
| baseInfo.setDescription("卡券使用说明"); | |||
| baseInfo.setServicePhone("4008803016"); | |||
| //商品信息 | |||
| Sku sku1 = new Sku(); | |||
| baseInfo.setSku(sku1); | |||
| //使用日期 | |||
| DateInfo dateInfo = new DateInfo(); | |||
| baseInfo.setDateInfo(dateInfo); | |||
| memberCard.setBaseInfo(baseInfo); | |||
| memberCard.setBonusRules("请参考积分规则"); | |||
| cardCreateRequest.setMemberCard(memberCard); | |||
| createMessage.setCardCreateRequest(cardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getMemberCardService().createMemberCard(createMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } else if (type.equalsIgnoreCase("giftcard")) { | |||
| //礼品卡 | |||
| WxMpMemberCardCreateMessage createMessage = new WxMpMemberCardCreateMessage(); | |||
| MemberCardCreateRequest cardCreateRequest = new MemberCardCreateRequest(); | |||
| MemberCard memberCard = new MemberCard(); | |||
| memberCard.setPrerogative("特权说明"); | |||
| //激活方式 | |||
| memberCard.setAutoActivate(true);//自动激活 | |||
| // memberCard.setActivateUrl("http://www.qq.com"); | |||
| // memberCard.setWxActivate(false);//微信激活 | |||
| memberCard.setSupplyBonus(false); | |||
| memberCard.setSupplyBalance(false); | |||
| memberCard.setBackgroundPicUrl(null); | |||
| memberCard.setDiscount(0); | |||
| BaseInfo baseInfo = new BaseInfo(); | |||
| baseInfo.setLogoUrl("http://mmbiz.qpic.cn/mmbiz_png/2kbqxXJ9VM94Uq1YAsZDPKcWnNIOU4lv2PJmgIf1HIicldDibj2xcXjwSeqI7ZTfUj0wOokFmurO6gA7ppzF0pug/0?wx_fmt=png"); | |||
| baseInfo.setCodeType("CODE_TYPE_QRCODE"); | |||
| baseInfo.setBrandName("金泸科技"); | |||
| baseInfo.setTitle("铂金用户贵宾卡"); | |||
| baseInfo.setColor("Color010"); | |||
| baseInfo.setNotice("卡券使用提醒"); | |||
| baseInfo.setDescription("卡券使用说明"); | |||
| baseInfo.setServicePhone("4008803016"); | |||
| //商品信息 | |||
| Sku sku1 = new Sku(); | |||
| baseInfo.setSku(sku1); | |||
| //使用日期 | |||
| DateInfo dateInfo = new DateInfo(); | |||
| baseInfo.setDateInfo(dateInfo); | |||
| memberCard.setBaseInfo(baseInfo); | |||
| memberCard.setBonusRules("请参考积分规则"); | |||
| cardCreateRequest.setMemberCard(memberCard); | |||
| createMessage.setCardCreateRequest(cardCreateRequest); | |||
| try { | |||
| WxMpCardCreateResult result = mpService.getMemberCardService().createMemberCard(createMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("发送客服消息-用户卡券") | |||
| @GetMapping("sendCard/{appId}") | |||
| public ResultData sendCard(@PathVariable String appId, String cardId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::sendCard"); | |||
| WxMpKefuMessage kfMessage = new WxMpKefuMessage(); | |||
| String openId = "onxhD5tpknKjLCxMe0FKUULE8zUg"; | |||
| kfMessage.setToUser(openId); | |||
| kfMessage.setMsgType(WxConsts.KefuMsgType.WXCARD); | |||
| kfMessage.setCardId(cardId); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| boolean result = mpService.getKefuService().sendKefuMessage(kfMessage); | |||
| logger.info("{}", result); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("获取用户卡券") | |||
| @GetMapping("getCardList/{appId}") | |||
| public ResultData getCardList(@PathVariable String appId, String openId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::getCardList"); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| WxMpCardUserGetCardListResult result = mpService.getCardService().getUserCardList(openId, null); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("查询Code接口") | |||
| @GetMapping("cardCodeGet/{appId}") | |||
| public ResultData cardCodeGet(@PathVariable String appId, String code) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::cardCodeGet"); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| WxMpCardResult result = mpService.getCardService().queryCardCode(null, code, true); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("核销Code接口") | |||
| @GetMapping("consumeCode/{appId}") | |||
| public ResultData consumeCode(@PathVariable String appId, String code) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::consumeCode"); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| String result = mpService.getCardService().consumeCardCode(code, null); | |||
| logger.info(result); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation("查看卡券详情") | |||
| @GetMapping("cardGet/{appId}") | |||
| public ResultData cardGet(@PathVariable String appId, String cardId) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::cardGet"); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| String result = mpService.getCardService().getCardDetail(cardId); | |||
| logger.info(result); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation(value = "批量查询卡券列表", notes = "status: CARD_STATUS_NOT_VERIFY”, 待审核 ; “CARD_STATUS_VERIFY_FAIL”, 审核失败; “CARD_STATUS_VERIFY_OK”, 通过审核; “CARD_STATUS_DELETE”, 卡券被商户删除; “CARD_STATUS_DISPATCH”,在公众平台投放过的卡券") | |||
| @GetMapping("cardBatchGet/{appId}") | |||
| public ResultData cardBatchGet(@PathVariable String appId, String status) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::cardBatchGet"); | |||
| List<String> statusList = new ArrayList<>(); | |||
| statusList.add(status); | |||
| try { | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| WxMpCardBatchGetResult result = mpService.getCardService().getCardBatchGet(0, 10, statusList); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation(value = "更新卡信息") | |||
| @GetMapping("updateCardUser/{appId}") | |||
| public ResultData updateCardUser(@PathVariable String appId, String code) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::updateCardUser"); | |||
| String cardId = "pnxhD5rozwYIX7j210S9thySoN0w"; | |||
| WxMpMemberCardUpdateMessage updateMessage = new WxMpMemberCardUpdateMessage(); | |||
| updateMessage.setAddBounus(100); | |||
| updateMessage.setBonus(1000); | |||
| updateMessage.setCardId(cardId); | |||
| updateMessage.setCode(code); | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| try { | |||
| WxMpMemberCardUpdateResult result = mpService.getMemberCardService().updateUserMemberCard(updateMessage); | |||
| logger.info(result.toString()); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| @ApiOperation(value = "失效卡") | |||
| @GetMapping("unavailableCardCode/{appId}") | |||
| public ResultData unavailableCardCode(@PathVariable String appId, String code) { | |||
| logger.debug("[" + getIpAddr() + "] WxCardController::unavailableCardCode"); | |||
| String cardId = "pnxhD5rozwYIX7j210S9thySoN0w"; | |||
| String reason = "会员卡退卡"; | |||
| WxMpService mpService = openService.getWxOpenComponentService().getWxMpServiceByAppid(appId); | |||
| try { | |||
| String result = mpService.getCardService().unavailableCardCode(cardId, code, reason); | |||
| logger.info(result); | |||
| } catch (WxErrorException e) { | |||
| logger.error(e.getMessage()); | |||
| } | |||
| return new ResultData(); | |||
| } | |||
| } | |||