Selaa lähdekoodia

Merge tag 'refs/tags/jenkins-back_end_wechat-273' into release

test

# Conflicts:
#	mallinkService/src/main/resources/mapper/MallPermissionMapper.xml
release
Stormeye Wu 6 vuotta sitten
vanhempi
commit
b2e94bc1ac
48 muutettua tiedostoa jossa 460 lisäystä ja 463 poistoa
  1. +2
    -5
      mallinkService/src/main/java/com/iformall/common/CommonMapper.java
  2. +12
    -16
      mallinkService/src/main/java/com/iformall/domain/dto/WxCUserBasicInfoDto.java
  3. +4
    -3
      mallinkService/src/main/java/com/iformall/domain/dto/WxWeappCodeAuditDto.java
  4. +18
    -4
      mallinkService/src/main/java/com/iformall/domain/po/BaseEntity.java
  5. +20
    -19
      mallinkService/src/main/java/com/iformall/domain/po/MallPermission.java
  6. +5
    -10
      mallinkService/src/main/java/com/iformall/domain/po/MallRole.java
  7. +13
    -21
      mallinkService/src/main/java/com/iformall/domain/po/MallUserInfo.java
  8. +2
    -9
      mallinkService/src/main/java/com/iformall/domain/po/WxAppinfo.java
  9. +4
    -6
      mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java
  10. +10
    -15
      mallinkService/src/main/java/com/iformall/domain/po/WxCUser.java
  11. +3
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java
  12. +3
    -11
      mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java
  13. +6
    -8
      mallinkService/src/main/java/com/iformall/domain/po/WxPayOrder.java
  14. +3
    -11
      mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java
  15. +2
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java
  16. +3
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxWeappBasicSet.java
  17. +2
    -9
      mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java
  18. +5
    -10
      mallinkService/src/main/java/com/iformall/domain/po/WxWeappExtSet.java
  19. +2
    -9
      mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java
  20. +38
    -0
      mallinkService/src/main/java/com/iformall/enums/EnumEnableType.java
  21. +4
    -3
      mallinkService/src/main/java/com/iformall/mapper/MallPermissionMapper.java
  22. +19
    -1
      mallinkService/src/main/java/com/iformall/mapper/MallUserInfoMapper.java
  23. +2
    -23
      mallinkService/src/main/java/com/iformall/service/MallPermissionService.java
  24. +4
    -20
      mallinkService/src/main/java/com/iformall/service/impl/MallPermissionServiceImpl.java
  25. +8
    -7
      mallinkService/src/main/java/com/iformall/service/impl/MallUserInfoServiceImpl.java
  26. +6
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxAppinfoServiceImpl.java
  27. +15
    -14
      mallinkService/src/main/java/com/iformall/service/impl/WxAuthorizerInfoServiceImpl.java
  28. +7
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxCUserServiceImpl.java
  29. +6
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxComponentVerifyTicketServiceImpl.java
  30. +6
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java
  31. +6
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxWeappAuditStatusServiceImpl.java
  32. +6
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxWeappBasicSetServiceImpl.java
  33. +5
    -4
      mallinkService/src/main/java/com/iformall/service/impl/WxWeappCodeStatusServiceImpl.java
  34. +8
    -7
      mallinkService/src/main/java/com/iformall/service/impl/WxWeappExtSetServiceImpl.java
  35. +6
    -5
      mallinkService/src/main/java/com/iformall/service/impl/WxWeappReleaseStatusServiceImpl.java
  36. +2
    -1
      mallinkService/src/main/java/com/iformall/service/wechat/FmOpenInRedisDBConfigStorage.java
  37. +3
    -0
      mallinkService/src/main/java/com/iformall/utils/Constant.java
  38. +48
    -0
      mallinkService/src/main/java/com/iformall/utils/OpenConstant.java
  39. +29
    -19
      mallinkService/src/main/resources/mapper/MallPermissionMapper.xml
  40. +1
    -1
      mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml
  41. +7
    -0
      mlWechatOpen/pom.xml
  42. +2
    -3
      mlWechatOpen/src/main/java/com/iformall/WechatOpenApplication.java
  43. +5
    -4
      mlWechatOpen/src/main/java/com/iformall/controller/WechatWeappSetController.java
  44. +10
    -8
      mlWechatOpen/src/main/java/com/iformall/controller/WxWeappExtSetController.java
  45. +45
    -43
      mlWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java
  46. +1
    -1
      mlWechatOpen/src/main/java/com/iformall/schedule/UserUnionIdSchedule.java
  47. +13
    -15
      mlWechatOpen/src/main/resources/application.yml
  48. +29
    -56
      pom.xml

+ 2
- 5
mallinkService/src/main/java/com/iformall/common/CommonMapper.java Näytä tiedosto

@@ -1,9 +1,6 @@
package com.iformall.common;

import tk.mybatis.mapper.common.BaseMapper;
import tk.mybatis.mapper.common.IdsMapper;
import tk.mybatis.mapper.common.Marker;
import tk.mybatis.mapper.common.special.InsertListMapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;

import java.io.Serializable;

@@ -12,5 +9,5 @@ import java.io.Serializable;
* @date 2017-12-27
*/

public interface CommonMapper<T, ID extends Serializable> extends BaseMapper<T>, IdsMapper<T>, InsertListMapper<T>, Marker {
public interface CommonMapper<T, ID extends Serializable> extends BaseMapper<T> {
}

+ 12
- 16
mallinkService/src/main/java/com/iformall/domain/dto/WxCUserBasicInfoDto.java Näytä tiedosto

@@ -1,26 +1,22 @@
package com.iformall.domain.dto;

import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.domain.po.BaseEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Id;
import javax.persistence.Transient;
/**
* 用户查询dto
* @author jinguo
*
*/
@Data
public class WxCUserBasicInfoDto implements Serializable{
@EqualsAndHashCode(callSuper = true)
public class WxCUserBasicInfoDto extends BaseEntity {

/**
*
*/
private static final long serialVersionUID = -1116465873573690766L;

@Id
protected Long id;
@io.swagger.annotations.ApiModelProperty(value="开始时间",name="startTime")
@@ -35,22 +31,22 @@ public class WxCUserBasicInfoDto implements Serializable{
@io.swagger.annotations.ApiModelProperty(value="姓名",name="name")
private String name;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="租户id",name="tenantId")
private String tenantId;
@Transient
@TableField(exist = false)
private Date birthStartTime;

@Transient
@TableField(exist = false)
private Date birthEndTime;

@Transient
@TableField(exist = false)
private Integer levelStartScore;
@Transient
@TableField(exist = false)
private Integer levelEndScore;

@Transient
@TableField(exist = false)
private Integer sex;
}

+ 4
- 3
mallinkService/src/main/java/com/iformall/domain/dto/WxWeappCodeAuditDto.java Näytä tiedosto

@@ -1,8 +1,8 @@
package com.iformall.domain.dto;

import com.iformall.domain.po.BaseEntity;
import lombok.Data;

import java.io.Serializable;
import lombok.EqualsAndHashCode;

/**
* 审核提交
@@ -10,7 +10,8 @@ import java.io.Serializable;
*
*/
@Data
public class WxWeappCodeAuditDto implements Serializable {
@EqualsAndHashCode(callSuper = true)
public class WxWeappCodeAuditDto extends BaseEntity {

private static final long serialVersionUID = -1116465873573690766L;



+ 18
- 4
mallinkService/src/main/java/com/iformall/domain/po/BaseEntity.java Näytä tiedosto

@@ -1,13 +1,14 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.iformall.common.SortColumn;
import lombok.Data;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;

import javax.persistence.Transient;
import java.io.Serializable;
import java.lang.reflect.Field;
import java.util.List;

/**
* @author luozukai
@@ -18,15 +19,28 @@ import java.lang.reflect.Field;
public class BaseEntity implements Serializable {

private static final long serialVersionUID = 1L;
@Transient

@TableField(exist = false)
private List<Long> ids;

@TableField(exist = false)
private String sortColumn;

@Transient
@TableField(exist = false)
private String sortOrder;

@Transient
@TableField(exist = false)
private String sortColumns;

@TableField(exist = false)
protected String floorForRule;

@TableField(exist = false)
protected String businessForRule;

@TableField(exist = false)
protected String[] tempShop;


public String getSortColumns() {
if(StringUtils.isBlank(sortColumn)){


+ 20
- 19
mallinkService/src/main/java/com/iformall/domain/po/MallPermission.java Näytä tiedosto

@@ -1,41 +1,42 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;

@Table(name = "mall_permission")
@TableName(value = "mall_permission")
@Data
@EqualsAndHashCode(callSuper = true)
public class MallPermission extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="权限名称",name="name")
private String name;
@Transient

@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="权限名称[LIKE]",name="nameLike")
private String nameLike;

@io.swagger.annotations.ApiModelProperty(value="父编号ID,一级菜单为0",name="parentId")
private Long parentId;
@Transient

@TableField(exist = false)
@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

@TableField(exist = false)
private List<String> permissions;

@io.swagger.annotations.ApiModelProperty(value="资源类型0:目录 1:菜单 2:按钮",name="resourceType")
private Integer resourceType;
@io.swagger.annotations.ApiModelProperty(value="菜单背景色-1级菜单使用",name="moduleColor")
@@ -51,20 +52,20 @@ public class MallPermission extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="排序",name="sort")
private Integer sort;

@Transient
@TableField(exist = false)
private Integer sortFrom;
@Transient
@TableField(exist = false)
private Integer sortTo;
@Transient
@TableField(exist = false)
private Integer sortGte;
@Transient
@TableField(exist = false)
private Integer sortGt;
@Transient
@TableField(exist = false)
private Integer sortLte;
@Transient
@TableField(exist = false)
private Integer sortLt;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="子菜单",name="children")
private List<?> children;



+ 5
- 10
mallinkService/src/main/java/com/iformall/domain/po/MallRole.java Näytä tiedosto

@@ -1,24 +1,19 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;

@Table(name = "mall_role")
@TableName(value = "mall_role")
@Data
@EqualsAndHashCode(callSuper = true)
public class MallRole extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id
protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@@ -28,8 +23,8 @@ public class MallRole extends BaseEntity {
private String available;
@io.swagger.annotations.ApiModelProperty(value="角色描述",name="description")
private String description;
@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="权限列表",name="menus")
private String menus;



+ 13
- 21
mallinkService/src/main/java/com/iformall/domain/po/MallUserInfo.java Näytä tiedosto

@@ -1,5 +1,7 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.enums.EnumUserAdmin;
import com.iformall.enums.EnumUserWechat;
import com.iformall.utils.Constant;
@@ -7,27 +9,17 @@ import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Table(name = "mall_user_info")
@TableName(value = "mall_user_info")
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class MallUserInfo extends BaseEntity {

@Id
protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@@ -57,29 +49,29 @@ public class MallUserInfo extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="admin用户微信登录用,可绑定多个账户",name="webOpenId")
private String webOpenId;

@io.swagger.annotations.ApiModelProperty(value="1 未绑定wechat,0 绑定微信",name="withWechat")
@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="1 未绑定wechat,0 绑定微信",name="withWechat")
private Integer withWechat;

@Transient
@TableField(exist = false)
private Integer withWechatForQuery;

@Transient
@TableField(exist = false)
private Long roleId;
@Transient
@TableField(exist = false)
private String roleName;
//该用户所有的角色
@Transient
@TableField(exist = false)
private List<MallRole> role;
//该用户包含的所有权限
@Transient
@TableField(exist = false)
private List<MallPermission> permission;
//拥有的菜单权限
@Transient
@TableField(exist = false)
private String menus;

@Transient
@TableField(exist = false)
private String captcha;

@io.swagger.annotations.ApiModelProperty(value = "邮箱", name = "email")


+ 2
- 9
mallinkService/src/main/java/com/iformall/domain/po/WxAppinfo.java Näytä tiedosto

@@ -1,24 +1,17 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Table(name = "wx_appinfo")
@TableName(value = "wx_appinfo")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxAppinfo extends BaseEntity {

@Id
protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;


+ 4
- 6
mallinkService/src/main/java/com/iformall/domain/po/WxAuthorizerInfo.java Näytä tiedosto

@@ -1,23 +1,21 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Table(name = "wx_authorizer_info")
@TableName(value = "wx_authorizer_info")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxAuthorizerInfo extends BaseEntity {

@Id
protected Long id;
@Transient
@TableField(exist = false)
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")


+ 10
- 15
mallinkService/src/main/java/com/iformall/domain/po/WxCUser.java Näytä tiedosto

@@ -1,31 +1,26 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonIgnoreProperties;
import com.iformall.utils.Constant;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.ToString;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.math.BigDecimal;
import java.util.Date;
import java.util.List;
import java.util.UUID;

@Table(name = "wx_c_user")
@TableName(value = "wx_c_user")
@JsonIgnoreProperties(ignoreUnknown = true)
@Data
@ToString(callSuper = true)
@EqualsAndHashCode(callSuper = true)
public class WxCUser extends BaseEntity {

@Id
protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@@ -114,28 +109,28 @@ public class WxCUser extends BaseEntity {
@io.swagger.annotations.ApiModelProperty(value="积分",name="credit")
private Integer credit;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="渠道名称",name="channelName")
private String channelName;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="渠道描述",name="sceneDescription")
protected String sceneDescription;

@Transient
@TableField(exist = false)
List<String> sceneList;

@Transient
@TableField(exist = false)
protected Date startDate;

@Transient
@TableField(exist = false)
protected Date endDate;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="操作人类型 枚举:EnumUserType",name="operatorType")
private Integer operatorType;

@Transient
@TableField(exist = false)
@io.swagger.annotations.ApiModelProperty(value="操作人ID",name="operatorId")
private Long operatorId;



+ 3
- 10
mallinkService/src/main/java/com/iformall/domain/po/WxComponentVerifyTicket.java Näytä tiedosto

@@ -1,25 +1,18 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;

@Table(name = "wx_component_verify_ticket")
@TableName(value = "wx_component_verify_ticket")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxComponentVerifyTicket extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="微信第三方componentAppid",name="componentAppid")
private String componentAppid;


+ 3
- 11
mallinkService/src/main/java/com/iformall/domain/po/WxPayAccount.java Näytä tiedosto

@@ -1,24 +1,16 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;

@Table(name = "wx_pay_account")
@TableName(value = "wx_pay_account")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxPayAccount extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;


+ 6
- 8
mallinkService/src/main/java/com/iformall/domain/po/WxPayOrder.java Näytä tiedosto

@@ -1,23 +1,21 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;
import java.io.Serializable;

@Table(name = "wx_pay_order")
@TableName(value = "wx_pay_order")
@Data
public class WxPayOrder implements Serializable {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
@TableField(exist = false)
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")


+ 3
- 11
mallinkService/src/main/java/com/iformall/domain/po/WxTemplateMsg.java Näytä tiedosto

@@ -1,26 +1,18 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;
import java.io.Serializable;

@Table(name = "wx_template_msg")
@TableName(value = "wx_template_msg")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxTemplateMsg extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;


+ 2
- 10
mallinkService/src/main/java/com/iformall/domain/po/WxWeappAuditStatus.java Näytä tiedosto

@@ -1,27 +1,19 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Table(name = "wx_weapp_audit_status")
@TableName(value = "wx_weapp_audit_status")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxWeappAuditStatus extends BaseEntity {
private static final long serialVersionUID = 1L;

@Id
protected Long id;

@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId")


+ 3
- 10
mallinkService/src/main/java/com/iformall/domain/po/WxWeappBasicSet.java Näytä tiedosto

@@ -1,26 +1,19 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;
import java.io.Serializable;

@Table(name = "wx_weapp_basic_set")
@TableName(value = "wx_weapp_basic_set")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxWeappBasicSet extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="小程序类型(1-B端 2-C端)",name="type")
private Integer type;


+ 2
- 9
mallinkService/src/main/java/com/iformall/domain/po/WxWeappCodeStatus.java Näytä tiedosto

@@ -1,27 +1,20 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.io.Serializable;
import java.util.Date;
import java.util.List;

@Table(name = "wx_weapp_code_status")
@TableName(value = "wx_weapp_code_status")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxWeappCodeStatus extends BaseEntity {
private static final long serialVersionUID = 1L;

@Id
protected Long id;

@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId")


+ 5
- 10
mallinkService/src/main/java/com/iformall/domain/po/WxWeappExtSet.java Näytä tiedosto

@@ -1,25 +1,18 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;
import java.util.*;
import javax.persistence.Transient;
import java.util.List;
import javax.persistence.Id;

@Table(name = "wx_weapp_ext_set")
@TableName(value = "wx_weapp_ext_set")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxWeappExtSet extends BaseEntity {
private static final long serialVersionUID = 1L;
@Id

protected Long id;
@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId")
private String appId;
@@ -31,6 +24,8 @@ public class WxWeappExtSet extends BaseEntity {
private String releaseJson;
@io.swagger.annotations.ApiModelProperty(value="停车(0:不支持,1:etcp)",name="carSupport")
private Integer carSupport;
@io.swagger.annotations.ApiModelProperty(value="菜单(0:全有,1:我的/首页, 2:无停车)",name="storeApp")
private Integer storeApp;
@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")


+ 2
- 9
mallinkService/src/main/java/com/iformall/domain/po/WxWeappReleaseStatus.java Näytä tiedosto

@@ -1,26 +1,19 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Transient;
import java.util.Date;
import java.util.List;

@Table(name = "wx_weapp_release_status")
@TableName(value = "wx_weapp_release_status")
@Data
@EqualsAndHashCode(callSuper = true)
public class WxWeappReleaseStatus extends BaseEntity {
private static final long serialVersionUID = 1L;

@Id
protected Long id;

@Transient
protected List<Long> ids;

@io.swagger.annotations.ApiModelProperty(value="租户ID",name="tenantId")
private String tenantId;
@io.swagger.annotations.ApiModelProperty(value="小程序ID",name="appId")


+ 38
- 0
mallinkService/src/main/java/com/iformall/enums/EnumEnableType.java Näytä tiedosto

@@ -0,0 +1,38 @@
package com.iformall.enums;

/**
* Created by Stormeye on 2018/08/09.
*/
public enum EnumEnableType {

// 0: SUCCESS, 1: FAIL

SUCC(0, "SUCCESS"),
FAIL(1, "FAIL"),
;

public static EnumEnableType getEnum(Integer code) {
for (EnumEnableType value : values()) {
if (value.getCode().equals(code)) {
return value;
}
}
return null;
}

private Integer code;
private String message;

EnumEnableType(Integer code, String message) {
this.code = code;
this.message = message;
}

public Integer getCode() {
return code;
}

public String getMessage() {
return message;
}
}

+ 4
- 3
mallinkService/src/main/java/com/iformall/mapper/MallPermissionMapper.java Näytä tiedosto

@@ -9,9 +9,10 @@ import java.util.List;
public interface MallPermissionMapper extends CommonMapper<MallPermission, String> {

List<MallPermission> findList(MallPermission mallPermission);
List<MallPermission> findPermissionByRoleId(Long roleId);
List<MallPermission> findPermissionByRoleIds(@Param("roleIds") List<Long> roleIds);

List<MallPermission> queryListParentId(Long parentId);

List<MallPermission> queryNotButtonList();



+ 19
- 1
mallinkService/src/main/java/com/iformall/mapper/MallUserInfoMapper.java Näytä tiedosto

@@ -1,6 +1,7 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.MallPermission;
import com.iformall.domain.po.MallUserInfo;
import com.iformall.domain.vo.MallUserInfoVo;
import org.apache.ibatis.annotations.Param;
@@ -10,7 +11,7 @@ import java.util.Map;

public interface MallUserInfoMapper extends CommonMapper<MallUserInfo, String> {

MallUserInfo selectById(@Param("id") Long id);
MallUserInfo getById(@Param("id") Long id);

List<MallUserInfo> findList(MallUserInfo mallUserInfo);

@@ -24,6 +25,8 @@ public interface MallUserInfoMapper extends CommonMapper<MallUserInfo, String> {

void removeWebOpenId(MallUserInfo mallUserInfo);

void removeAllOpenId(MallUserInfo mallUserInfo);

MallUserInfo selectByPhone(@Param("phone") String phone, @Param("tenantId") String tenantId);
Integer hasButtonPermission(@Param("userId") Long userId, @Param("permission") String permission);
@@ -35,4 +38,19 @@ public interface MallUserInfoMapper extends CommonMapper<MallUserInfo, String> {

List<MallUserInfoVo> selectUsersByWebOpenId(@Param("webOpenId") String webOpenId);

/**
* 查询用户的所有菜单
* @param userId 用户ID
*/
List<MallPermission> queryAllMenu(Long userId);
/**
* 查询用户的所有权限
* @param userId 用户ID
*/
List<String> queryAllPerms(Long userId);

/**
* 查询用户的所有菜单ID
*/
List<Long> queryAllMenuId(Long userId);
}

+ 2
- 23
mallinkService/src/main/java/com/iformall/service/MallPermissionService.java Näytä tiedosto

@@ -11,8 +11,8 @@ public interface MallPermissionService {
* 根据实体查询分页列表
*
* @param record
* @param offset
* @param limit
* @param pageIndex
* @param pageSize
* @return
*/
PageInfo<MallPermission> listAsPage(MallPermission record, Integer pageIndex, Integer pageSize);
@@ -38,25 +38,4 @@ public interface MallPermissionService {
* @param id
*/
void deleteById(Long id);
/**
* 根据roleId查询菜单和按钮权限
* @param roleId
* @return
*/
List<MallPermission> findPermissionByRoleId(Long roleId);

/**
* 根据ruleId权限组查找相应权限
* @param roleIds
* @return
*/
List<MallPermission> findPermissionByRoleIds(List<Long> roleIds);

}

+ 4
- 20
mallinkService/src/main/java/com/iformall/service/impl/MallPermissionServiceImpl.java Näytä tiedosto

@@ -28,7 +28,7 @@ public class MallPermissionServiceImpl implements MallPermissionService {

@Override
public MallPermission getById(Long id) {
return mallPermissionMapper.selectByPrimaryKey(id);
return mallPermissionMapper.selectById(id);
}

@Override
@@ -37,31 +37,15 @@ public class MallPermissionServiceImpl implements MallPermissionService {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
mallPermissionMapper.insertSelective(record);
mallPermissionMapper.insert(record);
} else {
mallPermissionMapper.updateByPrimaryKeySelective(record);
mallPermissionMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
mallPermissionMapper.deleteByPrimaryKey(id);
mallPermissionMapper.deleteById(id);
}
@Override
public List<MallPermission> findPermissionByRoleId(Long roleId) {
return mallPermissionMapper.findPermissionByRoleId(roleId);
}

@Override
public List<MallPermission> findPermissionByRoleIds(List<Long> roleIds) {
return mallPermissionMapper.findPermissionByRoleIds(roleIds);
}
}

+ 8
- 7
mallinkService/src/main/java/com/iformall/service/impl/MallUserInfoServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
@@ -31,12 +32,12 @@ public class MallUserInfoServiceImpl implements MallUserInfoService {

@Override
public int cntUserList(MallUserInfo record) {
return mallUserInfoMapper.selectCount(record);
return mallUserInfoMapper.selectCount(new QueryWrapper<>(record));
}

@Override
public MallUserInfo getById(Long id) {
return mallUserInfoMapper.selectById(id);
return mallUserInfoMapper.getById(id);
}

@Override
@@ -49,7 +50,7 @@ public class MallUserInfoServiceImpl implements MallUserInfoService {
MallUserInfo updateUser = new MallUserInfo();
updateUser.setId(user.getId());
updateUser.setBopenId(user.getBopenId());
mallUserInfoMapper.updateByPrimaryKeySelective(user);
mallUserInfoMapper.updateById(user);
}

@Override
@@ -78,15 +79,15 @@ public class MallUserInfoServiceImpl implements MallUserInfoService {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
mallUserInfoMapper.insertSelective(record);
mallUserInfoMapper.insert(record);
} else {
mallUserInfoMapper.updateByPrimaryKeySelective(record);
mallUserInfoMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
mallUserInfoMapper.deleteByPrimaryKey(id);
mallUserInfoMapper.deleteById(id);
}

@Override
@@ -98,7 +99,7 @@ public class MallUserInfoServiceImpl implements MallUserInfoService {
public long cntByUserName(String username) {
MallUserInfo userInfo = new MallUserInfo();
userInfo.setUsername(username);
return PageHelper.count(() -> mallUserInfoMapper.select(userInfo));
return PageHelper.count(() -> mallUserInfoMapper.selectList(new QueryWrapper<>(userInfo)));
}

@Override


+ 6
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxAppinfoServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxAppinfo;
@@ -26,7 +27,7 @@ public class WxAppinfoServiceImpl implements WxAppinfoService {
WxAppinfo appinfoQ = new WxAppinfo();
appinfoQ.setTenantId(tenantId);
appinfoQ.setType(EnumAppType.C.getCode());
List<WxAppinfo> appList = wxAppinfoMapper.select(appinfoQ);
List<WxAppinfo> appList = wxAppinfoMapper.selectList(new QueryWrapper<>(appinfoQ));
if (appList.size() > 0) {
appInfo = appList.get(0);
}
@@ -50,7 +51,7 @@ public class WxAppinfoServiceImpl implements WxAppinfoService {

@Override
public WxAppinfo getById(Long id) {
return wxAppinfoMapper.selectByPrimaryKey(id);
return wxAppinfoMapper.selectById(id);
}

@Override
@@ -59,14 +60,14 @@ public class WxAppinfoServiceImpl implements WxAppinfoService {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxAppinfoMapper.insertSelective(record);
wxAppinfoMapper.insert(record);
} else {
wxAppinfoMapper.updateByPrimaryKeySelective(record);
wxAppinfoMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
wxAppinfoMapper.deleteByPrimaryKey(id);
wxAppinfoMapper.deleteById(id);
}
}

+ 15
- 14
mallinkService/src/main/java/com/iformall/service/impl/WxAuthorizerInfoServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxAppinfo;
@@ -53,7 +54,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {

@Override
public WxAuthorizerInfo getById(Long id) {
return authorizerInfoMapper.selectByPrimaryKey(id);
return authorizerInfoMapper.selectById(id);
}

@Override
@@ -61,7 +62,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
WxAuthorizerInfo authQ = new WxAuthorizerInfo();
authQ.setAuthorizerAppid(appId);
try {
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.selectOne(authQ);
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.selectOne(new QueryWrapper<>(authQ));
return authorizerInfo;
} catch (Exception e) {
logger.error(e.getMessage());
@@ -80,7 +81,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
try {
WxAuthorizerInfo aiQ = new WxAuthorizerInfo();
aiQ.setAuthorizerAppid(record.getAuthorizerAppid());
authorizerInfo = authorizerInfoMapper.selectOne(aiQ);
authorizerInfo = authorizerInfoMapper.selectOne(new QueryWrapper<>(aiQ));
} catch (Exception e) {
logger.error(e.getMessage());
}
@@ -98,7 +99,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
record.setCreateTime(curDate);
record.setUpdateTime(curDate);
// 授权表 添加
authorizerInfoMapper.insertSelective(record);
authorizerInfoMapper.insert(record);
if(appinfo != null && appinfo.getType() != null) {
if (appinfo.getType().equals(EnumAppType.C.getCode()) ||
appinfo.getType().equals(EnumAppType.B.getCode())) {
@@ -114,20 +115,20 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
}
weappExtSet.setCreateDate(curDate);
weappExtSet.setUpdateDate(curDate);
weappExtSetMapper.insertSelective(weappExtSet);
weappExtSetMapper.insert(weappExtSet);
}
}
} else {
record.setId(authorizerInfo.getId());
record.setUpdateTime(curDate);
logger.info(record.toString());
authorizerInfoMapper.updateByPrimaryKeySelective(record);
authorizerInfoMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
authorizerInfoMapper.deleteByPrimaryKey(id);
authorizerInfoMapper.deleteById(id);
}

@Override
@@ -143,7 +144,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
info.setBaseStatus(record.getBaseStatus());
info.setBaseTime(curDate);
info.setUpdateTime(curDate);
return authorizerInfoMapper.updateByPrimaryKeySelective(info);
return authorizerInfoMapper.updateById(info);
}

@Override
@@ -154,7 +155,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
info.setDomainStatus(record.getDomainStatus());
info.setDomainTime(curDate);
info.setUpdateTime(curDate);
return authorizerInfoMapper.updateByPrimaryKeySelective(info);
return authorizerInfoMapper.updateById(info);
}

@Override
@@ -165,7 +166,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
info.setWebdomainStatus(record.getWebdomainStatus());
info.setWebdomainTime(curDate);
info.setUpdateTime(curDate);
return authorizerInfoMapper.updateByPrimaryKeySelective(info);
return authorizerInfoMapper.updateById(info);
}

@Override
@@ -176,7 +177,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
info.setTemplateStatus(record.getTemplateStatus());
info.setTemplateTime(curDate);
info.setUpdateTime(curDate);
return authorizerInfoMapper.updateByPrimaryKeySelective(info);
return authorizerInfoMapper.updateById(info);
}

@Override
@@ -186,7 +187,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
info.setId(record.getId());
info.setOpenAppid(record.getOpenAppid());
info.setBindOpenTime(curDate);
return authorizerInfoMapper.updateByPrimaryKeySelective(info);
return authorizerInfoMapper.updateById(info);
}

@Override
@@ -199,7 +200,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.findByAppid(record.getAuthorizerAppid());
if(authorizerInfo != null) {
record.setId(authorizerInfo.getId());
return authorizerInfoMapper.updateByPrimaryKeySelective(record);
return authorizerInfoMapper.updateById(record);
} else {
/// TODO
}
@@ -221,7 +222,7 @@ public class WxAuthorizerInfoServiceImpl implements WxAuthorizerInfoService {
} else {
// 不是同一个月,重置authBackNum
record.setAuditBackNum(1);
return authorizerInfoMapper.updateByPrimaryKeySelective(record);
return authorizerInfoMapper.updateById(record);
}
} else {
/// TODO


+ 7
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxCUserServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
@@ -32,7 +33,7 @@ public class WxCUserServiceImpl implements WxCUserService {

@Override
public WxCUser getById(Long id) {
return wxCUserMapper.selectByPrimaryKey(id);
return wxCUserMapper.selectById(id);
}

@Override
@@ -43,7 +44,7 @@ public class WxCUserServiceImpl implements WxCUserService {
@Override
public WxCUser getByObject(WxCUser record) {
try {
return wxCUserMapper.selectOne(record);
return wxCUserMapper.selectOne(new QueryWrapper<>(record));
} catch (Exception e) {
logger.error("NOT found: " + e.getMessage());
}
@@ -62,7 +63,7 @@ public class WxCUserServiceImpl implements WxCUserService {
// 已有,更新
user.setId(oldUser.getId());
// TODO 是否其他信息需要更新
ret = wxCUserMapper.updateByPrimaryKeySelective(user);
ret = wxCUserMapper.updateById(user);
return ret;
}
}
@@ -71,10 +72,10 @@ public class WxCUserServiceImpl implements WxCUserService {
user.setLoginCount(1);
user.setCreateDate(curr);
user.setUpdateDate(curr);
ret = wxCUserMapper.insertSelective(user);
ret = wxCUserMapper.insert(user);
} else {
user.setUpdateDate(curr);
ret = wxCUserMapper.updateByPrimaryKeySelective(user);
ret = wxCUserMapper.updateById(user);
}

return ret;
@@ -138,7 +139,7 @@ public class WxCUserServiceImpl implements WxCUserService {

@Override
public void deleteById(Long id) {
wxCUserMapper.deleteByPrimaryKey(id);
wxCUserMapper.deleteById(id);
}

@Override


+ 6
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxComponentVerifyTicketServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxComponentVerifyTicket;
@@ -26,7 +27,7 @@ public class WxComponentVerifyTicketServiceImpl implements WxComponentVerifyTick

@Override
public WxComponentVerifyTicket getById(Long id) {
return wxComponentVerifyTicketMapper.selectByPrimaryKey(id);
return wxComponentVerifyTicketMapper.selectById(id);
}

@Override
@@ -35,23 +36,23 @@ public class WxComponentVerifyTicketServiceImpl implements WxComponentVerifyTick
try {
WxComponentVerifyTicket ctQ = new WxComponentVerifyTicket();
ctQ.setComponentAppid(record.getComponentAppid());
wxComponentVerifyTicket = wxComponentVerifyTicketMapper.selectOne(ctQ);
wxComponentVerifyTicket = wxComponentVerifyTicketMapper.selectOne(new QueryWrapper<>(ctQ));
} catch (Exception e) {
logger.error(e.getMessage());
}
if (wxComponentVerifyTicket == null) {
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxComponentVerifyTicketMapper.insertSelective(record);
wxComponentVerifyTicketMapper.insert(record);
} else {
record.setId(wxComponentVerifyTicket.getId());
wxComponentVerifyTicketMapper.updateByPrimaryKeySelective(record);
wxComponentVerifyTicketMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
wxComponentVerifyTicketMapper.deleteByPrimaryKey(id);
wxComponentVerifyTicketMapper.deleteById(id);
}


+ 6
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxTemplateMsgServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxTemplateMsg;
@@ -28,12 +29,12 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService {

@Override
public WxTemplateMsg getById(Long id) {
return wxTemplateMsgMapper.selectByPrimaryKey(id);
return wxTemplateMsgMapper.selectById(id);
}

@Override
public WxTemplateMsg getByObj(WxTemplateMsg record) {
return wxTemplateMsgMapper.selectOne(record);
return wxTemplateMsgMapper.selectOne(new QueryWrapper<>(record));
}

@Override
@@ -45,16 +46,16 @@ public class WxTemplateMsgServiceImpl implements WxTemplateMsgService {
record.setId(idWorker.nextId());
record.setCreateDate(curDate);
record.setUpdateDate(curDate);
wxTemplateMsgMapper.insertSelective(record);
wxTemplateMsgMapper.insert(record);
} else {
record.setUpdateDate(curDate);
wxTemplateMsgMapper.updateByPrimaryKeySelective(record);
wxTemplateMsgMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
wxTemplateMsgMapper.deleteByPrimaryKey(id);
wxTemplateMsgMapper.deleteById(id);
}


+ 6
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxWeappAuditStatusServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
@@ -40,31 +41,31 @@ public class WxWeappAuditStatusServiceImpl implements WxWeappAuditStatusService

@Override
public WxWeappAuditStatus getById(Long id) {
return weappAuditStatusMapper.selectByPrimaryKey(id);
return weappAuditStatusMapper.selectById(id);
}

@Override
public WxWeappAuditStatus getByAppId(String appId) {
WxWeappAuditStatus statusQ = new WxWeappAuditStatus();
statusQ.setAppId(appId);
return weappAuditStatusMapper.selectOne(statusQ);
return weappAuditStatusMapper.selectOne(new QueryWrapper<>(statusQ));
}

@Override
public void saveStatus(WxWeappAuditStatus record) {
logger.info("AUDIT: " + record.toString());
weappAuditStatusMapper.insertSelective(record);
weappAuditStatusMapper.insert(record);
}

@Override
public void updateStatus(WxWeappAuditStatus record) {
logger.info("AUDIT: " + record.toString());
weappAuditStatusMapper.updateByPrimaryKeySelective(record);
weappAuditStatusMapper.updateById(record);
}

@Override
public void deleteById(Long id) {
weappAuditStatusMapper.deleteByPrimaryKey(id);
weappAuditStatusMapper.deleteById(id);
}


+ 6
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxWeappBasicSetServiceImpl.java Näytä tiedosto

@@ -1,6 +1,6 @@
package com.iformall.service.impl;

import java.util.*;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxWeappBasicSet;
@@ -24,12 +24,12 @@ public class WxWeappBasicSetServiceImpl implements WxWeappBasicSetService {

@Override
public WxWeappBasicSet getById(Long id) {
return wxWeappBasicSetMapper.selectByPrimaryKey(id);
return wxWeappBasicSetMapper.selectById(id);
}

@Override
public WxWeappBasicSet getByTypeAndDeploy(WxWeappBasicSet weappBasicSet) {
return wxWeappBasicSetMapper.selectOne(weappBasicSet);
return wxWeappBasicSetMapper.selectOne(new QueryWrapper<>(weappBasicSet));
}

@Override
@@ -38,15 +38,15 @@ public class WxWeappBasicSetServiceImpl implements WxWeappBasicSetService {
//record.setId(UUID.randomUUID().toString().replaceAll("-", ""));
final IdWorker idWorker = IdWorker.get();
record.setId(idWorker.nextId());
wxWeappBasicSetMapper.insertSelective(record);
wxWeappBasicSetMapper.insert(record);
} else {
wxWeappBasicSetMapper.updateByPrimaryKeySelective(record);
wxWeappBasicSetMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
wxWeappBasicSetMapper.deleteByPrimaryKey(id);
wxWeappBasicSetMapper.deleteById(id);
}


+ 5
- 4
mallinkService/src/main/java/com/iformall/service/impl/WxWeappCodeStatusServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
@@ -42,20 +43,20 @@ public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService {

@Override
public WxWeappCodeStatus getById(Long id) {
return weappCodeStatusMapper.selectByPrimaryKey(id);
return weappCodeStatusMapper.selectById(id);
}

@Override
public WxWeappCodeStatus getByAppId(String appId) {
WxWeappCodeStatus weappCodeStatusQ = new WxWeappCodeStatus();
weappCodeStatusQ.setAppId(appId);
return weappCodeStatusMapper.selectOne(weappCodeStatusQ);
return weappCodeStatusMapper.selectOne(new QueryWrapper<>(weappCodeStatusQ));
}

@Override
public void saveStatus(WxWeappCodeStatus record) {
logger.info("CODE-COMMIT: " + record.toString());
weappCodeStatusMapper.insertSelective(record);
weappCodeStatusMapper.insert(record);
}

@Override
@@ -66,7 +67,7 @@ public class WxWeappCodeStatusServiceImpl implements WxWeappCodeStatusService {

@Override
public void deleteById(Long id) {
weappCodeStatusMapper.deleteByPrimaryKey(id);
weappCodeStatusMapper.deleteById(id);
}


+ 8
- 7
mallinkService/src/main/java/com/iformall/service/impl/WxWeappExtSetServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxAppinfo;
@@ -36,12 +37,12 @@ public class WxWeappExtSetServiceImpl implements WxWeappExtSetService {

@Override
public WxWeappExtSet getById(Long id) {
return wxWeappExtSetMapper.selectByPrimaryKey(id);
return wxWeappExtSetMapper.selectById(id);
}

@Override
public WxWeappExtSet getByObj(WxWeappExtSet record) {
return wxWeappExtSetMapper.selectOne(record);
return wxWeappExtSetMapper.selectOne(new QueryWrapper<>(record));
}

@Override
@@ -55,7 +56,7 @@ public class WxWeappExtSetServiceImpl implements WxWeappExtSetService {
record.setType(appinfo.getType());
WxWeappExtSet q = new WxWeappExtSet();
q.setId(appinfo.getId());
int count = wxWeappExtSetMapper.selectCount(q);
int count = wxWeappExtSetMapper.selectCount(new QueryWrapper<>(q));
if (count > 0) {
isUpdate = true;
}
@@ -66,19 +67,19 @@ public class WxWeappExtSetServiceImpl implements WxWeappExtSetService {
record.setCreateDate(curDate);
record.setUpdateDate(curDate);
if (!isUpdate) {
wxWeappExtSetMapper.insertSelective(record);
wxWeappExtSetMapper.insert(record);
} else {
wxWeappExtSetMapper.updateByPrimaryKeySelective(record);
wxWeappExtSetMapper.updateById(record);
}
} else {
record.setUpdateDate(curDate);
wxWeappExtSetMapper.updateByPrimaryKeySelective(record);
wxWeappExtSetMapper.updateById(record);
}
}

@Override
public void deleteById(Long id) {
wxWeappExtSetMapper.deleteByPrimaryKey(id);
wxWeappExtSetMapper.deleteById(id);
}


+ 6
- 5
mallinkService/src/main/java/com/iformall/service/impl/WxWeappReleaseStatusServiceImpl.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.domain.po.WxAuthorizerInfo;
@@ -47,21 +48,21 @@ public class WxWeappReleaseStatusServiceImpl implements WxWeappReleaseStatusServ

@Override
public WxWeappReleaseStatus getById(Long id) {
return weappReleaseStatusMapper.selectByPrimaryKey(id);
return weappReleaseStatusMapper.selectById(id);
}

@Override
public WxWeappReleaseStatus getByAppId(String appId) {
WxWeappReleaseStatus weappCodeStatusQ = new WxWeappReleaseStatus();
weappCodeStatusQ.setAppId(appId);
return weappReleaseStatusMapper.selectOne(weappCodeStatusQ);
return weappReleaseStatusMapper.selectOne(new QueryWrapper<>(weappCodeStatusQ));
}

@Override
public void saveStatus(WxWeappReleaseStatus record) {
Date curDate = new Date();
logger.info("RELEASE: " + record.toString());
weappReleaseStatusMapper.insertSelective(record);
weappReleaseStatusMapper.insert(record);
// 更新 小程序 状态
if(record.getReleaseStatus().equals(EnumWeappReleaseStatus.SUCCESS.getCode())) { // 发布成功
WxAuthorizerInfo updateInfo = new WxAuthorizerInfo();
@@ -93,7 +94,7 @@ public class WxWeappReleaseStatusServiceImpl implements WxWeappReleaseStatusServ
try {
WxAuthorizerInfo appQ = new WxAuthorizerInfo();
appQ.setAuthorizerAppid(record.getAppId());
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.selectOne(appQ);
WxAuthorizerInfo authorizerInfo = authorizerInfoMapper.selectOne(new QueryWrapper<>(appQ));
if(authorizerInfo != null) {
record.setUserVersion(authorizerInfo.getCurrentVersion());
record.setVersionDesc(authorizerInfo.getCurrentDesc());
@@ -108,7 +109,7 @@ public class WxWeappReleaseStatusServiceImpl implements WxWeappReleaseStatusServ

@Override
public void deleteById(Long id) {
weappReleaseStatusMapper.deleteByPrimaryKey(id);
weappReleaseStatusMapper.deleteById(id);
}


+ 2
- 1
mallinkService/src/main/java/com/iformall/service/wechat/FmOpenInRedisDBConfigStorage.java Näytä tiedosto

@@ -1,5 +1,6 @@
package com.iformall.service.wechat;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.iformall.common.FmHttpClientBuilder;
import com.iformall.domain.po.WxAuthorizerInfo;
import com.iformall.domain.po.WxComponentVerifyTicket;
@@ -90,7 +91,7 @@ public class FmOpenInRedisDBConfigStorage extends WxOpenInMemoryConfigStorage {
WxComponentVerifyTicket wxComponentVerifyTicket = new WxComponentVerifyTicket();
wxComponentVerifyTicket.setComponentAppid(getComponentAppId());
try {
wxComponentVerifyTicket = wxComponentVerifyTicketMapper.selectOne(wxComponentVerifyTicket);
wxComponentVerifyTicket = wxComponentVerifyTicketMapper.selectOne(new QueryWrapper<>(wxComponentVerifyTicket));
if(wxComponentVerifyTicket != null) {
ticket = wxComponentVerifyTicket.getComponentVerifyTicket();
}


+ 3
- 0
mallinkService/src/main/java/com/iformall/utils/Constant.java Näytä tiedosto

@@ -8,6 +8,9 @@ public class Constant {

public static final int SYS_MENU_MAX = 2000; // 系统菜单最大值

public static final String C = "C";
public static final String B = "B";


// 1小时过期,
public final static int H_EXPIRE = 3600000;


+ 48
- 0
mallinkService/src/main/java/com/iformall/utils/OpenConstant.java Näytä tiedosto

@@ -0,0 +1,48 @@
package com.iformall.utils;

public class OpenConstant {

public static final String EXT = "ext";
public static final String ATTR = "attr";
public static final String EXT_APPID = "extAppid";
public static final String WE_APPID = "weappId";
public static final String NAME = "name";
public static final String TYPE = "type";
public static final String VERSION = "version";
public static final String TEMPLATE_ID = "templateId";

public static final String APPS = "apps";

public static final String APP_VERSION = "appVersion";
public static final String USER_VERSION = "userVersion";
public static final String USER_DESC = "userDesc";

public static final String ID = "id";
public static final String KEY_ID_LIST = "keyword_id_list";
public static final String CUSTOM_PARAM = "custom_param";

public static final String IF_HAVE_CAR_MODULE = "ifHaveCarModular";
public static final String IF_STORE_APP = "ifStoreApp";


public static final String ERRCODE = "errcode";
public static final Integer SUCC = 0;

public static final String VERIFY_SUCC = "verify_success";
public static final String VERIFY_FAIL = "verify_fail";
public static final String SET = "set";
public static final String URL = "url";
public static final String REQ_DOMAIN = "requestdomain";
public static final String WS_DOMAIN = "wsrequestdomain";
public static final String UPLOAD_DOMAIN = "uploaddomain";
public static final String DOWNLOAD_DOMAIN = "downloaddomain";

public static final String WEB = "web";
public static final String WEB_DOMAIN = "webviewdomain";


public static final String ERR_CODE_APP_IS_RELEASED = "85052";
public static final Integer ERR_APP_IS_RELEASED = 85052;


}

+ 29
- 19
mallinkService/src/main/resources/mapper/MallPermissionMapper.xml Näytä tiedosto

@@ -4,50 +4,46 @@
<resultMap id="BaseResultMap" type="com.iformall.domain.po.MallPermission">
<id column="id" jdbcType="BIGINT" property="id"/>
<result column="name" jdbcType="VARCHAR" property="name"/>
<result column="available" jdbcType="VARCHAR" property="available"/>
<result column="parent_id" jdbcType="BIGINT" property="parentId"/>
<result column="parent_ids" jdbcType="VARCHAR" property="parentIds"/>
<result column="available" jdbcType="VARCHAR" property="available"/>
<result column="permission" jdbcType="VARCHAR" property="permission"/>
<result column="resource_type" jdbcType="VARCHAR" property="resourceType"/>
<result column="module_color" jdbcType="VARCHAR" property="moduleColor"/>
<result column="module_color_num" jdbcType="VARCHAR" property="moduleColorNum"/>
<result column="url" jdbcType="VARCHAR" property="url"/>
<result column="icon" jdbcType="VARCHAR" property="icon"/>
<result column="version_type" jdbcType="VARCHAR" property="versionType"/>
<result column="sort" jdbcType="INTEGER" property="sort"/>
</resultMap>

<sql id="allColumns">
`id`,`name`,`available`,`parent_id`,`parent_ids`,`permission`,`resource_type`,`url`,`sort`
`id`,`name`,`parent_id`,`available`,`permission`,`resource_type`,`module_color`,`module_color_num`,`url`,`icon`,`sort`
</sql>

<sql id="dynamicWhereConditions">
where 1 = 1

<if test=" null != id ">
and `id` = #{id}

</if>

<if test=" null != name ">
and `name` like concat('%', #{name},'%')

and `name` = #{name}
</if>
<if test=" null != nameLike and '' != nameLike ">and `name` like concat('%', #{nameLike},'%')</if>

<if test=" null != available ">
and `available` like concat('%', #{available},'%')

<if test=" null != nameLike and '' != nameLike ">
and `name` like concat('%', #{nameLike},'%')
</if>

<if test=" null != parentId ">
and `parent_id` = #{parentId}

</if>

<if test=" null != parentIds ">
and `parent_ids` like concat('%', #{parentIds},'%')

<if test=" null != available ">
and `available` = #{available}
</if>

<if test=" null != permission ">
and `permission` like concat('%', #{permission},'%')
and `permission` = #{permission}

</if>
<if test=" null != permissions ">
@@ -58,18 +54,19 @@
</if>

<if test=" null != resourceType ">
and `resource_type` like concat('%', #{resourceType},'%')

and `resource_type` = #{resourceType}
</if>

<if test=" null != url ">
and `url` like concat('%', #{url},'%')
</if>

<if test=" null != icon ">
and `icon` = #{icon}
</if>

<if test=" null != sort ">
and `sort` = #{sort}

</if>
<if test=" null != sortFrom ">and `sort` >= #{sortFrom}</if>
<if test=" null != sortTo ">and #{sortTo} >= `sort`</if>
@@ -93,5 +90,18 @@
<include refid="dynamicWhereConditions"/>
</select>

<select id="queryListParentId" parameterType="long" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from mall_permission
where 1=1 and `parent_id` = #{value} and available = 'Y' order by sort asc
</select>

<select id="queryNotButtonList" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from mall_permission
where 1=1 and `resource_type` != 2 and `available` = 'Y' order by sort asc
</select>

</mapper>

+ 1
- 1
mallinkService/src/main/resources/mapper/MallUserInfoMapper.xml Näytä tiedosto

@@ -115,7 +115,7 @@
</if>
</select>

<select id="selectById" resultMap="BaseResultMap">
<select id="getById" resultMap="BaseResultMap">
select
<include refid="allSafeColumns"/>
from mall_user_info


+ 7
- 0
mlWechatOpen/pom.xml Näytä tiedosto

@@ -21,6 +21,7 @@
<artifactId>mallinkService</artifactId>
<version>1.0</version>
</dependency>

<dependency>
<groupId>com.google.zxing</groupId>
<artifactId>core</artifactId>
@@ -48,6 +49,7 @@
ch.qos.logback,
com.alibaba,
com.amazonaws,
com.baomidou,
com.mchange,
com.fasterxml.jackson.core,
com.fasterxml.jackson.dataformat,
@@ -98,6 +100,8 @@
javax.servlet,
javax.validation,
javax.xml.bind,
javax.xml.soap,
javax.xml.ws,
joda-time,
junit,
mysql,
@@ -135,6 +139,8 @@
org.jboss.xnio,
org.jdom,
org.jodd,
org.jvnet.mimepull,
org.jvnet.staxex,
org.mapstruct,
org.mockito,
org.mybatis,
@@ -143,6 +149,7 @@
org.ow2.asm,
org.projectlombok,
org.quartz-scheduler,
org.reactivestreams,
org.reflections,
org.rocketmq.spring.boot,
org.slf4j,


+ 2
- 3
mlWechatOpen/src/main/java/com/iformall/WechatOpenApplication.java Näytä tiedosto

@@ -1,20 +1,19 @@
package com.iformall;

import com.ulisesbocchio.jasyptspringboot.annotation.EnableEncryptableProperties;
import io.swagger.models.auth.In;
import org.mybatis.spring.annotation.MapperScan;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.Bean;
import springfox.documentation.swagger2.annotations.EnableSwagger2;
import tk.mybatis.spring.annotation.MapperScan;

/**
* @author stormeye
* @date 2019-01-14
*/
@SpringBootApplication
@MapperScan(basePackages = {"com.iformall.mapper"})
@MapperScan("com.iformall.mapper")
@EnableSwagger2
@EnableEncryptableProperties
public class WechatOpenApplication {


+ 5
- 4
mlWechatOpen/src/main/java/com/iformall/controller/WechatWeappSetController.java Näytä tiedosto

@@ -6,6 +6,7 @@ import com.iformall.common.ErrorCode;
import com.iformall.common.Result;
import com.iformall.common.ResultData;
import com.iformall.domain.po.WxAuthorizerInfo;
import com.iformall.enums.EnumEnableType;
import com.iformall.enums.EnumWxAuthorizationStatus;
import com.iformall.service.WxAuthorizerInfoService;
import com.iformall.service.wechat.FmOpenService;
@@ -107,13 +108,13 @@ public class WechatWeappSetController {
logger.info(openRet.toString());
if(openRet.isSuccess()) {
logger.info("设置服务器域名成功");
authorizerInfo.setDomainStatus(0);
authorizerInfo.setDomainStatus(EnumEnableType.SUCC.getCode());
authorizerInfo.setDomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());

} else {
logger.info("设置服务器域名成功");
authorizerInfo.setDomainStatus(1);
authorizerInfo.setDomainStatus(EnumEnableType.FAIL.getCode());
authorizerInfo.setDomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
}
@@ -146,12 +147,12 @@ public class WechatWeappSetController {
JSONObject webRetObj = JSON.parseObject(openRet);
if(webRetObj.getInteger("errcode").equals(0)) {
logger.info("设置服务器业务域名成功");
authorizerInfo.setWebdomainStatus(0);
authorizerInfo.setWebdomainStatus(EnumEnableType.SUCC.getCode());
authorizerInfo.setWebdomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
} else {
logger.info("设置服务器业务域名失败");
authorizerInfo.setWebdomainStatus(1);
authorizerInfo.setWebdomainStatus(EnumEnableType.FAIL.getCode());
authorizerInfo.setWebdomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
}


+ 10
- 8
mlWechatOpen/src/main/java/com/iformall/controller/WxWeappExtSetController.java Näytä tiedosto

@@ -11,6 +11,7 @@ import com.iformall.domain.po.WxWeappExtSet;
import com.iformall.enums.EnumAppType;
import com.iformall.service.WxAppinfoService;
import com.iformall.service.WxWeappExtSetService;
import com.iformall.utils.OpenConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -89,11 +90,11 @@ public class WxWeappExtSetController extends BaseController {
if(obj == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
JSONObject extObj = obj.getJSONObject("ext");
JSONObject extObj = obj.getJSONObject(OpenConstant.EXT);
if(extObj == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
JSONObject attrObj = extObj.getJSONObject("attr");
JSONObject attrObj = extObj.getJSONObject(OpenConstant.ATTR);
if(attrObj == null) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
@@ -105,19 +106,20 @@ public class WxWeappExtSetController extends BaseController {
if(appinfo == null) {
continue;
}
obj.put("extAppid", info.getAppId());
obj.put(OpenConstant.EXT_APPID, info.getAppId());
if(weappExtSet.getType().equals(EnumAppType.C.getCode())) {
if (attrObj != null) {
attrObj.put("ifHaveCarModular", String.valueOf(info.getCarSupport()));
attrObj.put(OpenConstant.IF_HAVE_CAR_MODULE, String.valueOf(info.getCarSupport()));
attrObj.put(OpenConstant.IF_STORE_APP, String.valueOf(info.getStoreApp()));
}
}
if(extObj != null) {
extObj.put("weappId", info.getAppId());
extObj.put("name", appinfo.getName());
extObj.put(OpenConstant.WE_APPID, info.getAppId());
extObj.put(OpenConstant.NAME, appinfo.getName());
if(weappExtSet.getType().equals(EnumAppType.C.getCode())) {
extObj.put("attr", attrObj);
extObj.put(OpenConstant.ATTR, attrObj);
}
obj.put("ext", extObj);
obj.put(OpenConstant.EXT, extObj);
}

WxWeappExtSet newInfo = new WxWeappExtSet();


+ 45
- 43
mlWechatOpen/src/main/java/com/iformall/controller/WxWeappInfoController.java Näytä tiedosto

@@ -21,6 +21,8 @@ import com.iformall.domain.vo.WxWeappReleaseStatusVo;
import com.iformall.enums.*;
import com.iformall.service.*;
import com.iformall.service.wechat.FmOpenService;
import com.iformall.utils.Constant;
import com.iformall.utils.OpenConstant;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -121,8 +123,8 @@ public class WxWeappInfoController extends BaseController {
@PostMapping("batchBasicSet")
public ResultData batchSet(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchBasicSet");
String appsStr = params.get("apps");
String typeStr = params.get("type");
String appsStr = params.get(OpenConstant.APPS);
String typeStr = params.get(OpenConstant.TYPE);

if(StringUtils.isBlank(typeStr)) {
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(), "type参数不能为空");
@@ -236,9 +238,9 @@ public class WxWeappInfoController extends BaseController {
return;
}
logger.info(msgObj.toJSONString());
String id = msgObj.getString("id");
JSONArray keyidlist = msgObj.getJSONArray("keyword_id_list");
String customParam = msgObj.getString("custom_param");
String id = msgObj.getString(OpenConstant.ID);
JSONArray keyidlist = msgObj.getJSONArray(OpenConstant.KEY_ID_LIST);
String customParam = msgObj.getString(OpenConstant.CUSTOM_PARAM);
logger.info(customParam);
JSONObject customParamObj = JSON.parseObject(customParam);
List<Integer> keyArr1 = getIdList(keyidlist);
@@ -264,12 +266,12 @@ public class WxWeappInfoController extends BaseController {

private void setBasicTemplateMsgVerifySuccess(JSONObject templeObj, WxAppinfo appinfo, WxMaService maService) throws WxErrorException {
// 核销成功消息
setBasicTemplateMsg(templeObj, appinfo, maService, EnumTemplateType.VERIFY_SUCCESS.getCode(), "verify_success");
setBasicTemplateMsg(templeObj, appinfo, maService, EnumTemplateType.VERIFY_SUCCESS.getCode(), OpenConstant.VERIFY_SUCC);
}

private void setBasicTemplateMsgVerifyFail(JSONObject templeObj, WxAppinfo appinfo, WxMaService maService) throws WxErrorException {
// 核销失败消息
setBasicTemplateMsg(templeObj, appinfo, maService, EnumTemplateType.VERIFY_FAIL.getCode(), "verify_fail");
setBasicTemplateMsg(templeObj, appinfo, maService, EnumTemplateType.VERIFY_FAIL.getCode(), OpenConstant.VERIFY_FAIL);
}

private void setBasicTemplateMsgPressSuccess(JSONObject templeObj, WxAppinfo appinfo, WxMaService maService) throws WxErrorException {
@@ -282,12 +284,12 @@ public class WxWeappInfoController extends BaseController {

private void setDomainUrl(JSONObject domainObj, WxAuthorizerInfo authorizerInfo, WxOpenMaService openMaService) throws WxErrorException {
// 服务器域名
String action = "set";
JSONObject urlObj = domainObj.getJSONObject("url");
List<String> requestDomain = getUrlList(urlObj.getJSONArray("requestdomain"));
List<String> wsrequestDomain = getUrlList(urlObj.getJSONArray("wsrequestdomain"));
List<String> uploadDomain = getUrlList(urlObj.getJSONArray("uploaddomain"));
List<String> downloadDomain = getUrlList(urlObj.getJSONArray("downloaddomain"));
String action = OpenConstant.SET;
JSONObject urlObj = domainObj.getJSONObject(OpenConstant.URL);
List<String> requestDomain = getUrlList(urlObj.getJSONArray(OpenConstant.REQ_DOMAIN));
List<String> wsrequestDomain = getUrlList(urlObj.getJSONArray(OpenConstant.WS_DOMAIN));
List<String> uploadDomain = getUrlList(urlObj.getJSONArray(OpenConstant.UPLOAD_DOMAIN));
List<String> downloadDomain = getUrlList(urlObj.getJSONArray(OpenConstant.DOWNLOAD_DOMAIN));
logger.info(downloadDomain.toString());
WxOpenMaDomainResult openRet = openMaService.modifyDomain(action,
requestDomain, wsrequestDomain,
@@ -295,31 +297,31 @@ public class WxWeappInfoController extends BaseController {
logger.info(openRet.toString());
if(openRet.isSuccess()) {
logger.info("设置服务器域名成功");
authorizerInfo.setDomainStatus(0);
authorizerInfo.setDomainStatus(EnumEnableType.SUCC.getCode());
authorizerInfo.setDomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());

} else {
logger.info("设置服务器域名成功");
authorizerInfo.setDomainStatus(1);
authorizerInfo.setDomainStatus(EnumEnableType.FAIL.getCode());
authorizerInfo.setDomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
}
authorizerInfoService.updateDomainUrl(authorizerInfo);
// 业务域名
JSONObject webObj = domainObj.getJSONObject("web");
List<String> urlList = getUrlList(webObj.getJSONArray("webviewdomain"));
JSONObject webObj = domainObj.getJSONObject(OpenConstant.WEB);
List<String> urlList = getUrlList(webObj.getJSONArray(OpenConstant.WEB_DOMAIN));
String openRet1 = openMaService.setWebViewDomain(action, urlList);
logger.info(openRet1);
JSONObject webRetObj = JSON.parseObject(openRet1);
if(webRetObj.getInteger("errcode").equals(0)) {
if(webRetObj.getInteger(OpenConstant.ERRCODE).equals(0)) {
logger.info("设置服务器业务域名成功");
authorizerInfo.setWebdomainStatus(0);
authorizerInfo.setWebdomainStatus(EnumEnableType.SUCC.getCode());
authorizerInfo.setWebdomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
} else {
logger.info("设置服务器业务域名失败");
authorizerInfo.setWebdomainStatus(1);
authorizerInfo.setWebdomainStatus(EnumEnableType.FAIL.getCode());
authorizerInfo.setWebdomainTime(new Date());
authorizerInfo.setUpdateTime(new Date());
}
@@ -331,10 +333,10 @@ public class WxWeappInfoController extends BaseController {
String versionRet = openMaService.setSupportVersion(weappBasicSet.getVersion());
logger.info(versionRet);
JSONObject verObj = JSON.parseObject(versionRet);
if(verObj.getInteger("errcode").equals(0)) {
authorizerInfo.setBaseStatus(0);
if(verObj.getInteger(OpenConstant.ERRCODE).equals(OpenConstant.SUCC)) {
authorizerInfo.setBaseStatus(EnumEnableType.SUCC.getCode());
} else {
authorizerInfo.setBaseStatus(1);
authorizerInfo.setBaseStatus(EnumEnableType.FAIL.getCode());
}
authorizerInfo.setBaseTime(new Date());
authorizerInfo.setUpdateTime(new Date());
@@ -361,11 +363,11 @@ public class WxWeappInfoController extends BaseController {
@PostMapping("batchCodeCommit")
public ResultData batchCodeCommit(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchExtSet");
String appsStr = params.get("apps");
String templateIdStr = params.get("templateId");
String typeStr = params.get("type");
String userVersion = params.get("userVersion");
String userDesc = params.get("userDesc");
String appsStr = params.get(OpenConstant.APPS);
String templateIdStr = params.get(OpenConstant.TEMPLATE_ID);
String typeStr = params.get(OpenConstant.TYPE);
String userVersion = params.get(OpenConstant.USER_VERSION);
String userDesc = params.get(OpenConstant.USER_DESC);

Integer type = null;
Long templateId = null;
@@ -436,9 +438,9 @@ public class WxWeappInfoController extends BaseController {

int iAppType = 0;
String appTypeStr = userVersion.substring(0, 1);
if(appTypeStr.equalsIgnoreCase("C"))
if(appTypeStr.equalsIgnoreCase(Constant.C))
iAppType = EnumAppType.C.getCode();
else if(appTypeStr.equalsIgnoreCase("B"))
else if(appTypeStr.equalsIgnoreCase(Constant.B))
iAppType = EnumAppType.B.getCode();

if(!appinfo.getType().equals(iAppType)) {
@@ -466,9 +468,9 @@ public class WxWeappInfoController extends BaseController {
@PostMapping("batchCodeAudit")
public ResultData batchCodeAudit(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchExtSet");
String appsStr = params.get("apps");
String typeStr = params.get("type");
String userVersion = params.get("userVersion");
String appsStr = params.get(OpenConstant.APPS);
String typeStr = params.get(OpenConstant.TYPE);
String userVersion = params.get(OpenConstant.USER_VERSION);
Integer type = null;
try {
type = Integer.parseInt(typeStr);
@@ -560,8 +562,8 @@ public class WxWeappInfoController extends BaseController {
WxMaOpenCommitExtInfo extInfo = gson.fromJson(extSet.getExtJson(), new TypeToken<WxMaOpenCommitExtInfo>() {}.getType());
logger.info("OLD: " + extInfo.toString());
// 自动修改提交的版本
if(extInfo.getExtMap().containsKey("appVersion")) {
extInfo.getExtMap().put("appVersion", userVersion);
if(extInfo.getExtMap().containsKey(OpenConstant.APP_VERSION)) {
extInfo.getExtMap().put(OpenConstant.APP_VERSION, userVersion);
}
logger.info("NEW: " + extInfo.toString());
WxOpenMaService openMaService = openService.getWxOpenComponentService().getWxMaServiceByAppid(appinfo.getAppId());
@@ -677,8 +679,8 @@ public class WxWeappInfoController extends BaseController {
public ResultData batchAuditQuery(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchAuditQuery");
Gson gson = new GsonBuilder().create();
String typeStr = params.get("type");
String version = params.get("version");
String typeStr = params.get(OpenConstant.TYPE);
String version = params.get(OpenConstant.VERSION);
Integer type = null;
try {
type = Integer.parseInt(typeStr);
@@ -736,8 +738,8 @@ public class WxWeappInfoController extends BaseController {
public ResultData batchAuditCancel(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchAuditCancel");
Gson gson = new GsonBuilder().create();
String typeStr = params.get("type");
String version = params.get("version");
String typeStr = params.get(OpenConstant.TYPE);
String version = params.get(OpenConstant.VERSION);
Integer type = null;
try {
type = Integer.parseInt(typeStr);
@@ -777,8 +779,8 @@ public class WxWeappInfoController extends BaseController {
public ResultData batchRelease(@RequestBody Map<String, String> params) {
logger.debug("[" + getIpAddr() + "] WxWeappInfoController::batchRelease");
Gson gson = new GsonBuilder().create();
String typeStr = params.get("type");
String version = params.get("version");
String typeStr = params.get(OpenConstant.TYPE);
String version = params.get(OpenConstant.VERSION);
Integer type = null;
try {
type = Integer.parseInt(typeStr);
@@ -827,7 +829,7 @@ public class WxWeappInfoController extends BaseController {
if(releaseSuccess) {
releaseStatus.setReleaseStatus(EnumWeappReleaseStatus.SUCCESS.getCode());
} else {
if(openRet.getErrcode().equals("85052")) {
if(openRet.getErrcode().equals(OpenConstant.ERR_CODE_APP_IS_RELEASED)) {
releaseStatus.setReleaseStatus(EnumWeappReleaseStatus.SUCCESS.getCode());
} else {
releaseStatus.setReleaseStatus(EnumWeappReleaseStatus.FAIL.getCode());
@@ -842,7 +844,7 @@ public class WxWeappInfoController extends BaseController {
}
} catch (WxErrorException e) {
logger.error(e.getMessage());
if(e.getError().getErrorCode() == 85052) {
if(e.getError().getErrorCode() == OpenConstant.ERR_APP_IS_RELEASED) {
releaseStatus.setReleaseStatus(EnumWeappReleaseStatus.SUCCESS.getCode());
} else {
releaseStatus.setReleaseStatus(EnumWeappReleaseStatus.FAIL.getCode());


+ 1
- 1
mlWechatOpen/src/main/java/com/iformall/schedule/UserUnionIdSchedule.java Näytä tiedosto

@@ -65,7 +65,7 @@ public class UserUnionIdSchedule {
String openRet = openMaService.getPaidUnionId(payOrderVo.getOpenId(), payOrderVo.getTransactionId(), null, null);
logger.info(openRet);
} else {
WxPayAccount payAccount = payAccountMapper.selectByPrimaryKey(payOrderVo.getPayId());
WxPayAccount payAccount = payAccountMapper.selectById(payOrderVo.getPayId());
if(payAccount != null) {
String openRet = openMaService.getPaidUnionId(payOrderVo.getOpenId(), null, payAccount.getMchId(), payOrderVo.getPayOrderNo());
logger.info(openRet);


+ 13
- 15
mlWechatOpen/src/main/resources/application.yml Näytä tiedosto

@@ -22,21 +22,6 @@ spring:
redis:
time-to-live: 60000ms #很重要,缓存的有效时间,以便缓存的过期(单位为毫秒)



# @{link} https://github.com/abel533
#Mybatis
mybatis:
type-aliases-package: com.iformall.domain.po
mapper-locations: classpath:mapper/*Mapper.xml
configuration:
map-underscore-to-camel-case: true
cache-enabled: true
lazy-loading-enabled: true
use-generated-keys: true
default-fetch-size: 100
default-statement-timeout: 10

#PageHelper
pagehelper:
helperDialect: mysql
@@ -51,4 +36,17 @@ mapper:
mappers:
- com.iformall.common.CommonMapper

mybatis-plus:
mapper-locations: classpath:mapper/*Mapper.xml
global-config:
db-config:
id-type: id_worker
field-strategy: not_null
db-type: mysql
configuration:
jdbc-type-for-null: 'null'
cache-enabled: false
call-setters-on-nulls: true
type-aliases-package: com.iformall.domain.po

version: @project.version@

+ 29
- 56
pom.xml Näytä tiedosto

@@ -18,7 +18,7 @@
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.1.5.RELEASE</version>
<version>2.1.8.RELEASE</version>
<relativePath/>
</parent>

@@ -82,20 +82,38 @@
<artifactId>spring-boot-starter-mail</artifactId>
</dependency>

<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>1.3.2</version>
</dependency>
<dependency>
<groupId>com.github.pagehelper</groupId>
<artifactId>pagehelper-spring-boot-starter</artifactId>
<version>1.2.7</version>
<version>1.2.10</version>
<exclusions>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis</artifactId>
</exclusion>
<exclusion>
<groupId>org.mybatis</groupId>
<artifactId>mybatis-spring</artifactId>
</exclusion>
</exclusions>
</dependency>

<dependency>
<groupId>tk.mybatis</groupId>
<artifactId>mapper-spring-boot-starter</artifactId>
<version>2.0.4</version>
<groupId>com.baomidou</groupId>
<artifactId>mybatis-plus-boot-starter</artifactId>
<version>3.1.0</version>
</dependency>

<dependency>
<groupId>org.mybatis.spring.boot</groupId>
<artifactId>mybatis-spring-boot-starter</artifactId>
<version>2.1.0</version>
</dependency>

<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</version>
</dependency>

<dependency>
@@ -106,7 +124,7 @@
<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.11</version>
<version>8.0.17</version>
<scope>runtime</scope>
</dependency>
<dependency>
@@ -148,27 +166,6 @@
<artifactId>druid</artifactId>
<version>1.1.12</version>
</dependency>
<dependency>
<groupId>org.mybatis.generator</groupId>
<artifactId>mybatis-generator-core</artifactId>
<version>1.3.7</version>
</dependency>

<dependency>
<groupId>org.quartz-scheduler</groupId>
<artifactId>quartz</artifactId>
<version>${quartz.version}</version>
<exclusions>
<exclusion>
<groupId>com.mchange</groupId>
<artifactId>c3p0</artifactId>
</exclusion>
<exclusion>
<groupId>com.zaxxer</groupId>
<artifactId>HikariCP-java6</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- Swagger -->
<dependency>
@@ -201,29 +198,12 @@
<artifactId>jaxb-api</artifactId>
<version>2.3.0</version>
</dependency>
<dependency>
<groupId>javax.persistence</groupId>
<artifactId>persistence-api</artifactId>
<version>1.0.2</version>
</dependency>
<dependency>
<groupId>org.projectlombok</groupId>
<artifactId>lombok</artifactId>
<version>1.18.2</version>
<scope>provided</scope>
</dependency>
<!-- </dependencyManagement> -->
<!-- <dependencies> -->
<!-- <dependency> -->
<!-- <groupId>com.iformall</groupId> -->
<!-- <artifactId>base</artifactId> -->
<!-- <version>1.0</version> -->
<!-- </dependency> -->
<!-- <dependency> -->
<!-- <groupId>com.iformall</groupId> -->
<!-- <artifactId>freemarker</artifactId> -->
<!-- <version>1.0</version> -->
<!-- </dependency> -->
<dependency>
<groupId>org.apache.shiro</groupId>
<artifactId>shiro-spring</artifactId>
@@ -253,13 +233,6 @@
<artifactId>bcpkix-jdk15on</artifactId>
<version>1.60</version>
</dependency>
<!-- <dependency> -->
<!-- <groupId>net.coobird</groupId> -->
<!-- <artifactId>thumbnailator</artifactId> -->
<!-- <version>0.4.8</version> -->
<!-- </dependency> -->

<!-- https://mvnrepository.com/artifact/commons-io/commons-io -->
<dependency>
<groupId>commons-io</groupId>
<artifactId>commons-io</artifactId>


Ladataan…
Peruuta
Tallenna