Ver código fonte

机构列表迁移

zhijiezhao 1 ano atrás
pai
commit
0aa9e60fce

+ 30 - 0
src/main/java/com/caimei365/manager/controller/caimei/user/UserApi.java

@@ -1,8 +1,19 @@
 package com.caimei365.manager.controller.caimei.user;
 
+import com.caimei365.manager.entity.PaginationVo;
+
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.cmUser.CmClub;
+import com.caimei365.manager.entity.caimei.cmUser.CmClubLabel;
+import com.caimei365.manager.service.caimei.user.CmUserService;
+import org.springframework.web.bind.annotation.GetMapping;
 import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RequestParam;
 import org.springframework.web.bind.annotation.RestController;
 
+import javax.annotation.Resource;
+import java.util.List;
+
 /**
  * 用户管理接口
  */
@@ -10,5 +21,24 @@ import org.springframework.web.bind.annotation.RestController;
 @RequestMapping("/user")
 public class UserApi {
 
+    @Resource
+    private CmUserService userService;
+
+    @GetMapping("/club/list")
+    public ResponseJson<PaginationVo<CmClub>> getClubList(CmClub club,
+                                                                @RequestParam(value = "pageNum", defaultValue = "1") int pageNum,
+                                                                @RequestParam(value = "pageSize", defaultValue = "20") int pageSize) {
+        return userService.getClubList(club, pageNum, pageSize);
+    }
+
+    /**
+     *  0:动态标签;1:静态标签
+     * @param dynamicStatus
+     * @return
+     */
+    @GetMapping("/club/label")
+    public ResponseJson<List<CmClubLabel>> getClubLabels(Integer dynamicStatus) {
+        return userService.getClubLabels(dynamicStatus);
+    }
 
 }

+ 7 - 3
src/main/java/com/caimei365/manager/dao/user/UserMapper.java

@@ -2,6 +2,8 @@ package com.caimei365.manager.dao.user;
 
 import java.util.List;
 
+import com.caimei365.manager.entity.caimei.cmUser.CmClub;
+import com.caimei365.manager.entity.caimei.cmUser.CmClubLabel;
 import com.caimei365.manager.entity.caimei.cmUser.User;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
@@ -13,8 +15,7 @@ import org.apache.ibatis.annotations.Param;
  * @date 2023-12-14
  */
 @Mapper
-public interface UserMapper
-{
+public interface UserMapper {
     /**
      * 通过对象查询用户信息列表
      *
@@ -83,9 +84,12 @@ public interface UserMapper
     /**
      * 批量删除用户信息
      *
-     * @param  需要删除的数据主键集合
+     * @param 需要删除的数据主键集合
      * @return 结果
      */
     int delUser(User user);
 
+    List<CmClub> findClubList(CmClub club);
+
+    List<CmClubLabel> findLabels(Integer dynamicStatus);
 }

+ 91 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmClub.java

@@ -0,0 +1,91 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import lombok.Data;
+
+import java.util.Date;
+
+
+@Data
+public class CmClub {
+
+    private static final long serialVersionUID = 1L;
+    private String checkMan;        //审核人
+    private Integer clubId;        // 会所ID
+    private Integer userId;        // 用户ID
+    private Integer userOrganizeId;//用户组织ID
+    private String name;        // 会所名称
+    private String sname;        // 简称
+    private String contractEmail;
+    private String logo;        // logo
+    private String legalPerson;        // 法人
+    private Integer provinceId;        // 省
+    private Integer cityId;        // 市
+    private Integer townId;        // 地址ID
+    private String flag;        // 拉会所上线的用户的cmBindId,以逗号结尾
+
+    private Integer spId;        // 协销Id
+    private String scanTime;        // 扫描时间
+    private String address;        // 详细地址
+    private String linkMan;        // 联系人
+    private Integer linkManIdentity;    //联系人身份:1老板,2采购,3运营
+    private String contractPhone;        // 联系电话
+    private String contractMobile;        // 联系手机
+    private String fax;        // 传真
+    private String info;        // 公司简介
+    private String addTime;        // 注册时间
+    private String auditTime;        // 审核时间
+    private String auditNote;        // 审核备注
+    private Integer status;        // 状态
+    private String businessLicenseImage;        // 营业执照
+
+    private String mainpro;        // 主打项目
+    private String scanFlag;        // 扫描状态 0待扫描 1 已扫描 2已上线
+    private String headpic;        // 门头照
+    private Date lastModify;        // 最后更新时间
+    private String firstClubType; // 一级分类为医美=1和生美=2
+    private String secondClubType; // 医美的二级分类为诊所=1、门诊=2、医院=3。  生美没有二级分类
+    private String department; // 若为医美分类下的门诊和医院则需要填写科室。
+    private String medicalPracticeLicenseImg; // 医美分类必须上传医疗执业许可证
+    private String socialCreditCode;//统一社会编码
+
+    private String activeState;     // 活跃状态
+    private String customerValue;   // 客户价值
+    /**
+     * 非持久化字段
+     */
+    private String source; //注册来源: 0网站 1小程序
+    private String spName; //创客名称
+    private String account;//企业会所用户账号
+    private String mobile;
+    private String userName;  //联系人
+    private String bindMobile;  //企业绑定手机号
+    private String email;       //邮箱
+    private Date registerTime;
+    private String registerIP;// IP
+    private String userScanFlag;        // 扫描标志(4 CRM拉上来的会所)
+    private String town; // 区
+    private String city; // 市
+    private String province; //省
+    private String startTime;     //注册时间开始 查询条件
+    private String endTime;        //注册时间结束  查询条件
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date providerTime;     //分配协销时间 查询条件
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date loginTime;     //上次登录时间 查询条件
+    private String startLoginTime;     //登录时间开始 查询条件
+    private String endLoginTime;        //登录时间结束  查询条件
+    private String userIdentity;  //用户身份
+    private Integer svipUserFlag;   //超级会员用户标识,1是,2不是
+    private Integer newDeal;//新分配机构状态 0.否,1.是
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String allocationStartTime; // 开始分配时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String allocationEndTime; // 结束分配时间
+    private String trendsLabel;   // 动态标签
+    private String stateLabel;   // 静态标签
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String labelStartTime;  // 需求跨度开始时间
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private String labelEndTime;    // 需求跨度结束时间
+}

+ 36 - 0
src/main/java/com/caimei365/manager/entity/caimei/cmUser/CmClubLabel.java

@@ -0,0 +1,36 @@
+package com.caimei365.manager.entity.caimei.cmUser;
+
+import lombok.Data;
+
+@Data
+public class CmClubLabel {
+    private Integer id;
+    /**
+     * 机构Id
+     */
+    private Integer clubId;
+    /**
+     * 关键词
+     */
+    private String label;
+    /**
+     * 页面类型
+     */
+    private Integer pageType;
+    /**
+     * 0:动态标签;1:静态标签
+     */
+    private Integer dynamicStatus;
+    /**
+     * 出现次数
+     */
+    private Integer appearNumber;
+    /**
+     * 添加时间
+     */
+    private String addTime;
+    /**
+     * 删除标记
+     */
+    private Integer delFlag;
+}

+ 16 - 0
src/main/java/com/caimei365/manager/service/caimei/user/CmUserService.java

@@ -0,0 +1,16 @@
+package com.caimei365.manager.service.caimei.user;
+
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.cmUser.CmClub;
+import com.caimei365.manager.entity.caimei.cmUser.CmClubLabel;
+import com.caimei365.manager.entity.caimei.cmUser.User;
+
+import java.util.List;
+
+public interface CmUserService {
+
+    ResponseJson<PaginationVo<CmClub>> getClubList(CmClub club, int pageNum, int pageSize);
+
+    ResponseJson<List<CmClubLabel>> getClubLabels(Integer dynamicStatus);
+}

+ 36 - 0
src/main/java/com/caimei365/manager/service/caimei/user/impl/CmUserServiceImpl.java

@@ -0,0 +1,36 @@
+package com.caimei365.manager.service.caimei.user.impl;
+
+import com.caimei365.manager.dao.user.UserMapper;
+import com.caimei365.manager.entity.PaginationVo;
+import com.caimei365.manager.entity.ResponseJson;
+import com.caimei365.manager.entity.caimei.cmUser.CmClub;
+import com.caimei365.manager.entity.caimei.cmUser.CmClubLabel;
+import com.caimei365.manager.service.caimei.user.CmUserService;
+import com.github.pagehelper.PageHelper;
+import org.springframework.stereotype.Service;
+
+import javax.annotation.Resource;
+import java.util.List;
+
+@Service
+public class CmUserServiceImpl implements CmUserService {
+
+    @Resource
+    private UserMapper userMapper;
+
+    @Override
+    public ResponseJson<PaginationVo<CmClub>> getClubList(CmClub club, int pageNum, int pageSize) {
+        PageHelper.startPage(pageNum,pageSize);
+        List<CmClub> clubs = userMapper.findClubList(club);
+        PaginationVo<CmClub> pageList = new PaginationVo<>(clubs);
+        return ResponseJson.success(pageList);
+    }
+
+    @Override
+    public ResponseJson<List<CmClubLabel>> getClubLabels(Integer dynamicStatus) {
+        List<CmClubLabel> labels = userMapper.findLabels(dynamicStatus);
+        return null;
+    }
+
+
+}

+ 542 - 316
src/main/resources/mapper/user/UserMapper.xml

@@ -5,148 +5,149 @@
 <mapper namespace="com.caimei365.manager.dao.user.UserMapper">
 
     <resultMap type="User" id="UserResult">
-        <result property="userID"    column="userID"    />
-        <result property="userOrganizeID"    column="userOrganizeID"    />
-        <result property="account"    column="account"    />
-        <result property="mobile"    column="mobile"    />
-        <result property="bindMobile"    column="bindMobile"    />
-        <result property="userPermission"    column="userPermission"    />
-        <result property="userIdentity"    column="userIdentity"    />
-        <result property="email"    column="email"    />
-        <result property="userName"    column="userName"    />
-        <result property="realName"    column="realName"    />
-        <result property="source"    column="source"    />
-        <result property="image"    column="image"    />
-        <result property="password"    column="password"    />
-        <result property="name"    column="name"    />
-        <result property="registerUserTypeID"    column="registerUserTypeID"    />
-        <result property="manufacturerStatus"    column="manufacturerStatus"    />
-        <result property="shopID"    column="shopID"    />
-        <result property="auditStatus"    column="auditStatus"    />
-        <result property="auditTime"    column="auditTime"    />
-        <result property="auditNote"    column="auditNote"    />
-        <result property="registerTime"    column="registerTime"    />
-        <result property="registerIP"    column="registerIP"    />
-        <result property="ipAddress"    column="ipAddress"    />
-        <result property="loginTime"    column="loginTime"    />
-        <result property="loginIP"    column="loginIP"    />
-        <result property="validFlag"    column="validFlag"    />
-        <result property="clubStatus"    column="clubStatus"    />
-        <result property="clubID"    column="clubID"    />
-        <result property="agreeFlag"    column="agreeFlag"    />
-        <result property="serviceProviderStatus"    column="serviceProviderStatus"    />
-        <result property="serviceProviderID"    column="serviceProviderID"    />
-        <result property="userMoney"    column="userMoney"    />
-        <result property="ableUserMoney"    column="ableUserMoney"    />
-        <result property="logoffTime"    column="logoffTime"    />
-        <result property="appKey"    column="appKey"    />
-        <result property="appSecret"    column="appSecret"    />
-        <result property="scanFlag"    column="scanFlag"    />
-        <result property="userBeans"    column="userBeans"    />
-        <result property="guideFlag"    column="guideFlag"    />
-        <result property="loginFailTime"    column="loginFailTime"    />
-        <result property="tipStatus"    column="tipStatus"    />
-        <result property="onlineMoney"    column="onlineMoney"    />
-        <result property="unionId"    column="unionId"    />
-        <result property="openId"    column="openId"    />
+        <result property="userID" column="userID"/>
+        <result property="userOrganizeID" column="userOrganizeID"/>
+        <result property="account" column="account"/>
+        <result property="mobile" column="mobile"/>
+        <result property="bindMobile" column="bindMobile"/>
+        <result property="userPermission" column="userPermission"/>
+        <result property="userIdentity" column="userIdentity"/>
+        <result property="email" column="email"/>
+        <result property="userName" column="userName"/>
+        <result property="realName" column="realName"/>
+        <result property="source" column="source"/>
+        <result property="image" column="image"/>
+        <result property="password" column="password"/>
+        <result property="name" column="name"/>
+        <result property="registerUserTypeID" column="registerUserTypeID"/>
+        <result property="manufacturerStatus" column="manufacturerStatus"/>
+        <result property="shopID" column="shopID"/>
+        <result property="auditStatus" column="auditStatus"/>
+        <result property="auditTime" column="auditTime"/>
+        <result property="auditNote" column="auditNote"/>
+        <result property="registerTime" column="registerTime"/>
+        <result property="registerIP" column="registerIP"/>
+        <result property="ipAddress" column="ipAddress"/>
+        <result property="loginTime" column="loginTime"/>
+        <result property="loginIP" column="loginIP"/>
+        <result property="validFlag" column="validFlag"/>
+        <result property="clubStatus" column="clubStatus"/>
+        <result property="clubID" column="clubID"/>
+        <result property="agreeFlag" column="agreeFlag"/>
+        <result property="serviceProviderStatus" column="serviceProviderStatus"/>
+        <result property="serviceProviderID" column="serviceProviderID"/>
+        <result property="userMoney" column="userMoney"/>
+        <result property="ableUserMoney" column="ableUserMoney"/>
+        <result property="logoffTime" column="logoffTime"/>
+        <result property="appKey" column="appKey"/>
+        <result property="appSecret" column="appSecret"/>
+        <result property="scanFlag" column="scanFlag"/>
+        <result property="userBeans" column="userBeans"/>
+        <result property="guideFlag" column="guideFlag"/>
+        <result property="loginFailTime" column="loginFailTime"/>
+        <result property="tipStatus" column="tipStatus"/>
+        <result property="onlineMoney" column="onlineMoney"/>
+        <result property="unionId" column="unionId"/>
+        <result property="openId" column="openId"/>
     </resultMap>
 
     <sql id="selectUserVo">
-        select
-            user.userID,
-            user.userOrganizeID,
-            user.account,
-            user.mobile,
-            user.bindMobile,
-            user.userPermission,
-            user.userIdentity,
-            user.email,
-            user.userName,
-            user.realName,
-            user.source,
-            user.image,
-            user.password,
-            user.name,
-            user.registerUserTypeID,
-            user.manufacturerStatus,
-            user.shopID,
-            user.auditStatus,
-            user.auditTime,
-            user.auditNote,
-            user.registerTime,
-            user.registerIP,
-            user.ipAddress,
-            user.loginTime,
-            user.loginIP,
-            user.validFlag,
-            user.clubStatus,
-            user.clubID,
-            user.agreeFlag,
-            user.serviceProviderStatus,
-            user.serviceProviderID,
-            ifnull(user.userMoney,0) AS userMoney,
-            ifnull(user.ableUserMoney,0) AS ableUserMoney,
-            user.logoffTime,
-            user.appKey,
-            user.appSecret,
-            user.scanFlag,
-            user.userBeans,
-            user.guideFlag,
-            user.loginFailTime,
-            user.tipStatus,
-            ifnull(user.onlineMoney,0) AS onlineMoney,
-            user.unionId,
-            user.openId
+        select user.userID,
+               user.userOrganizeID,
+               user.account,
+               user.mobile,
+               user.bindMobile,
+               user.userPermission,
+               user.userIdentity,
+               user.email,
+               user.userName,
+               user.realName,
+               user.source,
+               user.image,
+               user.password,
+               user.name,
+               user.registerUserTypeID,
+               user.manufacturerStatus,
+               user.shopID,
+               user.auditStatus,
+               user.auditTime,
+               user.auditNote,
+               user.registerTime,
+               user.registerIP,
+               user.ipAddress,
+               user.loginTime,
+               user.loginIP,
+               user.validFlag,
+               user.clubStatus,
+               user.clubID,
+               user.agreeFlag,
+               user.serviceProviderStatus,
+               user.serviceProviderID,
+               ifnull(user.userMoney, 0)     AS userMoney,
+               ifnull(user.ableUserMoney, 0) AS ableUserMoney,
+               user.logoffTime,
+               user.appKey,
+               user.appSecret,
+               user.scanFlag,
+               user.userBeans,
+               user.guideFlag,
+               user.loginFailTime,
+               user.tipStatus,
+               ifnull(user.onlineMoney, 0)   AS onlineMoney,
+               user.unionId,
+               user.openId
     </sql>
 
     <select id="getByUser" parameterType="User" resultMap="UserResult">
         <include refid="selectUserVo"/>
         from user AS user
-        <where>  user.delFlag = 0
-            <if test="userID != null  and userID != ''"> and user.userID = #{userID}</if>
-            <if test="userOrganizeID != null "> and user.userOrganizeID = #{userOrganizeID}</if>
-            <if test="account != null  and account != ''"> and user.account = #{account}</if>
-            <if test="mobile != null  and mobile != ''"> and user.mobile = #{mobile}</if>
-            <if test="bindMobile != null  and bindMobile != ''"> and user.bindMobile = #{bindMobile}</if>
-            <if test="userPermission != null "> and user.userPermission = #{userPermission}</if>
-            <if test="userIdentity != null "> and user.userIdentity = #{userIdentity}</if>
-            <if test="email != null  and email != ''"> and user.email = #{email}</if>
-            <if test="userName != null  and userName != ''"> and user.userName like concat('%', #{userName}, '%')</if>
-            <if test="realName != null  and realName != ''"> and user.realName like concat('%', #{realName}, '%')</if>
-            <if test="source != null  and source != ''"> and user.source = #{source}</if>
-            <if test="image != null  and image != ''"> and user.image = #{image}</if>
-            <if test="password != null  and password != ''"> and user.password = #{password}</if>
-            <if test="name != null  and name != ''"> and user.name like concat('%', #{name}, '%')</if>
-            <if test="registerUserTypeID != null  and registerUserTypeID != ''"> and user.registerUserTypeID = #{registerUserTypeID}</if>
-            <if test="manufacturerStatus != null "> and user.manufacturerStatus = #{manufacturerStatus}</if>
-            <if test="shopID != null "> and user.shopID = #{shopID}</if>
-            <if test="auditStatus != null  and auditStatus != ''"> and user.auditStatus = #{auditStatus}</if>
-            <if test="auditTime != null  and auditTime != ''"> and user.auditTime = #{auditTime}</if>
-            <if test="auditNote != null  and auditNote != ''"> and user.auditNote = #{auditNote}</if>
-            <if test="registerTime != null  and registerTime != ''"> and user.registerTime = #{registerTime}</if>
-            <if test="registerIP != null  and registerIP != ''"> and user.registerIP = #{registerIP}</if>
-            <if test="ipAddress != null  and ipAddress != ''"> and user.ipAddress = #{ipAddress}</if>
-            <if test="loginTime != null  and loginTime != ''"> and user.loginTime = #{loginTime}</if>
-            <if test="loginIP != null  and loginIP != ''"> and user.loginIP = #{loginIP}</if>
-            <if test="validFlag != null  and validFlag != ''"> and user.validFlag = #{validFlag}</if>
-            <if test="clubStatus != null "> and user.clubStatus = #{clubStatus}</if>
-            <if test="clubID != null "> and user.clubID = #{clubID}</if>
-            <if test="agreeFlag != null  and agreeFlag != ''"> and user.agreeFlag = #{agreeFlag}</if>
-            <if test="serviceProviderStatus != null "> and user.serviceProviderStatus = #{serviceProviderStatus}</if>
-            <if test="serviceProviderID != null "> and user.serviceProviderID = #{serviceProviderID}</if>
-            <if test="userMoney != null "> and user.userMoney = #{userMoney}</if>
-            <if test="ableUserMoney != null "> and user.ableUserMoney = #{ableUserMoney}</if>
-            <if test="logoffTime != null  and logoffTime != ''"> and user.logoffTime = #{logoffTime}</if>
-            <if test="appKey != null  and appKey != ''"> and user.appKey = #{appKey}</if>
-            <if test="appSecret != null  and appSecret != ''"> and user.appSecret = #{appSecret}</if>
-            <if test="scanFlag != null "> and user.scanFlag = #{scanFlag}</if>
-            <if test="userBeans != null "> and user.userBeans = #{userBeans}</if>
-            <if test="guideFlag != null "> and user.guideFlag = #{guideFlag}</if>
-            <if test="loginFailTime != null "> and user.loginFailTime = #{loginFailTime}</if>
-            <if test="tipStatus != null  and tipStatus != ''"> and user.tipStatus = #{tipStatus}</if>
-            <if test="onlineMoney != null "> and user.onlineMoney = #{onlineMoney}</if>
-            <if test="unionId != null  and unionId != ''"> and user.unionId = #{unionId}</if>
-            <if test="openId != null  and openId != ''"> and user.openId = #{openId}</if>
+        <where>user.delFlag = 0
+            <if test="userID != null  and userID != ''">and user.userID = #{userID}</if>
+            <if test="userOrganizeID != null ">and user.userOrganizeID = #{userOrganizeID}</if>
+            <if test="account != null  and account != ''">and user.account = #{account}</if>
+            <if test="mobile != null  and mobile != ''">and user.mobile = #{mobile}</if>
+            <if test="bindMobile != null  and bindMobile != ''">and user.bindMobile = #{bindMobile}</if>
+            <if test="userPermission != null ">and user.userPermission = #{userPermission}</if>
+            <if test="userIdentity != null ">and user.userIdentity = #{userIdentity}</if>
+            <if test="email != null  and email != ''">and user.email = #{email}</if>
+            <if test="userName != null  and userName != ''">and user.userName like concat('%', #{userName}, '%')</if>
+            <if test="realName != null  and realName != ''">and user.realName like concat('%', #{realName}, '%')</if>
+            <if test="source != null  and source != ''">and user.source = #{source}</if>
+            <if test="image != null  and image != ''">and user.image = #{image}</if>
+            <if test="password != null  and password != ''">and user.password = #{password}</if>
+            <if test="name != null  and name != ''">and user.name like concat('%', #{name}, '%')</if>
+            <if test="registerUserTypeID != null  and registerUserTypeID != ''">and user.registerUserTypeID =
+                #{registerUserTypeID}
+            </if>
+            <if test="manufacturerStatus != null ">and user.manufacturerStatus = #{manufacturerStatus}</if>
+            <if test="shopID != null ">and user.shopID = #{shopID}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and user.auditStatus = #{auditStatus}</if>
+            <if test="auditTime != null  and auditTime != ''">and user.auditTime = #{auditTime}</if>
+            <if test="auditNote != null  and auditNote != ''">and user.auditNote = #{auditNote}</if>
+            <if test="registerTime != null  and registerTime != ''">and user.registerTime = #{registerTime}</if>
+            <if test="registerIP != null  and registerIP != ''">and user.registerIP = #{registerIP}</if>
+            <if test="ipAddress != null  and ipAddress != ''">and user.ipAddress = #{ipAddress}</if>
+            <if test="loginTime != null  and loginTime != ''">and user.loginTime = #{loginTime}</if>
+            <if test="loginIP != null  and loginIP != ''">and user.loginIP = #{loginIP}</if>
+            <if test="validFlag != null  and validFlag != ''">and user.validFlag = #{validFlag}</if>
+            <if test="clubStatus != null ">and user.clubStatus = #{clubStatus}</if>
+            <if test="clubID != null ">and user.clubID = #{clubID}</if>
+            <if test="agreeFlag != null  and agreeFlag != ''">and user.agreeFlag = #{agreeFlag}</if>
+            <if test="serviceProviderStatus != null ">and user.serviceProviderStatus = #{serviceProviderStatus}</if>
+            <if test="serviceProviderID != null ">and user.serviceProviderID = #{serviceProviderID}</if>
+            <if test="userMoney != null ">and user.userMoney = #{userMoney}</if>
+            <if test="ableUserMoney != null ">and user.ableUserMoney = #{ableUserMoney}</if>
+            <if test="logoffTime != null  and logoffTime != ''">and user.logoffTime = #{logoffTime}</if>
+            <if test="appKey != null  and appKey != ''">and user.appKey = #{appKey}</if>
+            <if test="appSecret != null  and appSecret != ''">and user.appSecret = #{appSecret}</if>
+            <if test="scanFlag != null ">and user.scanFlag = #{scanFlag}</if>
+            <if test="userBeans != null ">and user.userBeans = #{userBeans}</if>
+            <if test="guideFlag != null ">and user.guideFlag = #{guideFlag}</if>
+            <if test="loginFailTime != null ">and user.loginFailTime = #{loginFailTime}</if>
+            <if test="tipStatus != null  and tipStatus != ''">and user.tipStatus = #{tipStatus}</if>
+            <if test="onlineMoney != null ">and user.onlineMoney = #{onlineMoney}</if>
+            <if test="unionId != null  and unionId != ''">and user.unionId = #{unionId}</if>
+            <if test="openId != null  and openId != ''">and user.openId = #{openId}</if>
         </where>
         group by user.userID
         limit 0,1
@@ -155,51 +156,53 @@
     <select id="getUserList" parameterType="User" resultMap="UserResult">
         <include refid="selectUserVo"/>
         from user AS user
-        <where>  user.delFlag = 0
-            <if test="userID != null  and userID != ''"> and user.userID = #{userID}</if>
-            <if test="userOrganizeID != null "> and user.userOrganizeID = #{userOrganizeID}</if>
-            <if test="account != null  and account != ''"> and user.account = #{account}</if>
-            <if test="mobile != null  and mobile != ''"> and user.mobile = #{mobile}</if>
-            <if test="bindMobile != null  and bindMobile != ''"> and user.bindMobile = #{bindMobile}</if>
-            <if test="userPermission != null "> and user.userPermission = #{userPermission}</if>
-            <if test="userIdentity != null "> and user.userIdentity = #{userIdentity}</if>
-            <if test="email != null  and email != ''"> and user.email = #{email}</if>
-            <if test="userName != null  and userName != ''"> and user.userName like concat('%', #{userName}, '%')</if>
-            <if test="realName != null  and realName != ''"> and user.realName like concat('%', #{realName}, '%')</if>
-            <if test="source != null  and source != ''"> and user.source = #{source}</if>
-            <if test="image != null  and image != ''"> and user.image = #{image}</if>
-            <if test="password != null  and password != ''"> and user.password = #{password}</if>
-            <if test="name != null  and name != ''"> and user.name like concat('%', #{name}, '%')</if>
-            <if test="registerUserTypeID != null  and registerUserTypeID != ''"> and user.registerUserTypeID = #{registerUserTypeID}</if>
-            <if test="manufacturerStatus != null "> and user.manufacturerStatus = #{manufacturerStatus}</if>
-            <if test="shopID != null "> and user.shopID = #{shopID}</if>
-            <if test="auditStatus != null  and auditStatus != ''"> and user.auditStatus = #{auditStatus}</if>
-            <if test="auditTime != null  and auditTime != ''"> and user.auditTime = #{auditTime}</if>
-            <if test="auditNote != null  and auditNote != ''"> and user.auditNote = #{auditNote}</if>
-            <if test="registerTime != null  and registerTime != ''"> and user.registerTime = #{registerTime}</if>
-            <if test="registerIP != null  and registerIP != ''"> and user.registerIP = #{registerIP}</if>
-            <if test="ipAddress != null  and ipAddress != ''"> and user.ipAddress = #{ipAddress}</if>
-            <if test="loginTime != null  and loginTime != ''"> and user.loginTime = #{loginTime}</if>
-            <if test="loginIP != null  and loginIP != ''"> and user.loginIP = #{loginIP}</if>
-            <if test="validFlag != null  and validFlag != ''"> and user.validFlag = #{validFlag}</if>
-            <if test="clubStatus != null "> and user.clubStatus = #{clubStatus}</if>
-            <if test="clubID != null "> and user.clubID = #{clubID}</if>
-            <if test="agreeFlag != null  and agreeFlag != ''"> and user.agreeFlag = #{agreeFlag}</if>
-            <if test="serviceProviderStatus != null "> and user.serviceProviderStatus = #{serviceProviderStatus}</if>
-            <if test="serviceProviderID != null "> and user.serviceProviderID = #{serviceProviderID}</if>
-            <if test="userMoney != null "> and user.userMoney = #{userMoney}</if>
-            <if test="ableUserMoney != null "> and user.ableUserMoney = #{ableUserMoney}</if>
-            <if test="logoffTime != null  and logoffTime != ''"> and user.logoffTime = #{logoffTime}</if>
-            <if test="appKey != null  and appKey != ''"> and user.appKey = #{appKey}</if>
-            <if test="appSecret != null  and appSecret != ''"> and user.appSecret = #{appSecret}</if>
-            <if test="scanFlag != null "> and user.scanFlag = #{scanFlag}</if>
-            <if test="userBeans != null "> and user.userBeans = #{userBeans}</if>
-            <if test="guideFlag != null "> and user.guideFlag = #{guideFlag}</if>
-            <if test="loginFailTime != null "> and user.loginFailTime = #{loginFailTime}</if>
-            <if test="tipStatus != null  and tipStatus != ''"> and user.tipStatus = #{tipStatus}</if>
-            <if test="onlineMoney != null "> and user.onlineMoney = #{onlineMoney}</if>
-            <if test="unionId != null  and unionId != ''"> and user.unionId = #{unionId}</if>
-            <if test="openId != null  and openId != ''"> and user.openId = #{openId}</if>
+        <where>user.delFlag = 0
+            <if test="userID != null  and userID != ''">and user.userID = #{userID}</if>
+            <if test="userOrganizeID != null ">and user.userOrganizeID = #{userOrganizeID}</if>
+            <if test="account != null  and account != ''">and user.account = #{account}</if>
+            <if test="mobile != null  and mobile != ''">and user.mobile = #{mobile}</if>
+            <if test="bindMobile != null  and bindMobile != ''">and user.bindMobile = #{bindMobile}</if>
+            <if test="userPermission != null ">and user.userPermission = #{userPermission}</if>
+            <if test="userIdentity != null ">and user.userIdentity = #{userIdentity}</if>
+            <if test="email != null  and email != ''">and user.email = #{email}</if>
+            <if test="userName != null  and userName != ''">and user.userName like concat('%', #{userName}, '%')</if>
+            <if test="realName != null  and realName != ''">and user.realName like concat('%', #{realName}, '%')</if>
+            <if test="source != null  and source != ''">and user.source = #{source}</if>
+            <if test="image != null  and image != ''">and user.image = #{image}</if>
+            <if test="password != null  and password != ''">and user.password = #{password}</if>
+            <if test="name != null  and name != ''">and user.name like concat('%', #{name}, '%')</if>
+            <if test="registerUserTypeID != null  and registerUserTypeID != ''">and user.registerUserTypeID =
+                #{registerUserTypeID}
+            </if>
+            <if test="manufacturerStatus != null ">and user.manufacturerStatus = #{manufacturerStatus}</if>
+            <if test="shopID != null ">and user.shopID = #{shopID}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and user.auditStatus = #{auditStatus}</if>
+            <if test="auditTime != null  and auditTime != ''">and user.auditTime = #{auditTime}</if>
+            <if test="auditNote != null  and auditNote != ''">and user.auditNote = #{auditNote}</if>
+            <if test="registerTime != null  and registerTime != ''">and user.registerTime = #{registerTime}</if>
+            <if test="registerIP != null  and registerIP != ''">and user.registerIP = #{registerIP}</if>
+            <if test="ipAddress != null  and ipAddress != ''">and user.ipAddress = #{ipAddress}</if>
+            <if test="loginTime != null  and loginTime != ''">and user.loginTime = #{loginTime}</if>
+            <if test="loginIP != null  and loginIP != ''">and user.loginIP = #{loginIP}</if>
+            <if test="validFlag != null  and validFlag != ''">and user.validFlag = #{validFlag}</if>
+            <if test="clubStatus != null ">and user.clubStatus = #{clubStatus}</if>
+            <if test="clubID != null ">and user.clubID = #{clubID}</if>
+            <if test="agreeFlag != null  and agreeFlag != ''">and user.agreeFlag = #{agreeFlag}</if>
+            <if test="serviceProviderStatus != null ">and user.serviceProviderStatus = #{serviceProviderStatus}</if>
+            <if test="serviceProviderID != null ">and user.serviceProviderID = #{serviceProviderID}</if>
+            <if test="userMoney != null ">and user.userMoney = #{userMoney}</if>
+            <if test="ableUserMoney != null ">and user.ableUserMoney = #{ableUserMoney}</if>
+            <if test="logoffTime != null  and logoffTime != ''">and user.logoffTime = #{logoffTime}</if>
+            <if test="appKey != null  and appKey != ''">and user.appKey = #{appKey}</if>
+            <if test="appSecret != null  and appSecret != ''">and user.appSecret = #{appSecret}</if>
+            <if test="scanFlag != null ">and user.scanFlag = #{scanFlag}</if>
+            <if test="userBeans != null ">and user.userBeans = #{userBeans}</if>
+            <if test="guideFlag != null ">and user.guideFlag = #{guideFlag}</if>
+            <if test="loginFailTime != null ">and user.loginFailTime = #{loginFailTime}</if>
+            <if test="tipStatus != null  and tipStatus != ''">and user.tipStatus = #{tipStatus}</if>
+            <if test="onlineMoney != null ">and user.onlineMoney = #{onlineMoney}</if>
+            <if test="unionId != null  and unionId != ''">and user.unionId = #{unionId}</if>
+            <if test="openId != null  and openId != ''">and user.openId = #{openId}</if>
         </where>
         group by user.userID
         order by user.createTime desc
@@ -208,113 +211,331 @@
     <select id="getCount" parameterType="User" resultType="int">
         select count(1)
         from user AS user
-        <where>  user.delFlag = 0
-            <if test="userID != null  and userID != ''"> and user.userID = #{userID}</if>
-            <if test="userOrganizeID != null "> and user.userOrganizeID = #{userOrganizeID}</if>
-            <if test="account != null  and account != ''"> and user.account = #{account}</if>
-            <if test="mobile != null  and mobile != ''"> and user.mobile = #{mobile}</if>
-            <if test="bindMobile != null  and bindMobile != ''"> and user.bindMobile = #{bindMobile}</if>
-            <if test="userPermission != null "> and user.userPermission = #{userPermission}</if>
-            <if test="userIdentity != null "> and user.userIdentity = #{userIdentity}</if>
-            <if test="email != null  and email != ''"> and user.email = #{email}</if>
-            <if test="userName != null  and userName != ''"> and user.userName like concat('%', #{userName}, '%')</if>
-            <if test="realName != null  and realName != ''"> and user.realName like concat('%', #{realName}, '%')</if>
-            <if test="source != null  and source != ''"> and user.source = #{source}</if>
-            <if test="image != null  and image != ''"> and user.image = #{image}</if>
-            <if test="password != null  and password != ''"> and user.password = #{password}</if>
-            <if test="name != null  and name != ''"> and user.name like concat('%', #{name}, '%')</if>
-            <if test="registerUserTypeID != null  and registerUserTypeID != ''"> and user.registerUserTypeID = #{registerUserTypeID}</if>
-            <if test="manufacturerStatus != null "> and user.manufacturerStatus = #{manufacturerStatus}</if>
-            <if test="shopID != null "> and user.shopID = #{shopID}</if>
-            <if test="auditStatus != null  and auditStatus != ''"> and user.auditStatus = #{auditStatus}</if>
-            <if test="auditTime != null  and auditTime != ''"> and user.auditTime = #{auditTime}</if>
-            <if test="auditNote != null  and auditNote != ''"> and user.auditNote = #{auditNote}</if>
-            <if test="registerTime != null  and registerTime != ''"> and user.registerTime = #{registerTime}</if>
-            <if test="registerIP != null  and registerIP != ''"> and user.registerIP = #{registerIP}</if>
-            <if test="ipAddress != null  and ipAddress != ''"> and user.ipAddress = #{ipAddress}</if>
-            <if test="loginTime != null  and loginTime != ''"> and user.loginTime = #{loginTime}</if>
-            <if test="loginIP != null  and loginIP != ''"> and user.loginIP = #{loginIP}</if>
-            <if test="validFlag != null  and validFlag != ''"> and user.validFlag = #{validFlag}</if>
-            <if test="clubStatus != null "> and user.clubStatus = #{clubStatus}</if>
-            <if test="clubID != null "> and user.clubID = #{clubID}</if>
-            <if test="agreeFlag != null  and agreeFlag != ''"> and user.agreeFlag = #{agreeFlag}</if>
-            <if test="serviceProviderStatus != null "> and user.serviceProviderStatus = #{serviceProviderStatus}</if>
-            <if test="serviceProviderID != null "> and user.serviceProviderID = #{serviceProviderID}</if>
-            <if test="userMoney != null "> and user.userMoney = #{userMoney}</if>
-            <if test="ableUserMoney != null "> and user.ableUserMoney = #{ableUserMoney}</if>
-            <if test="logoffTime != null  and logoffTime != ''"> and user.logoffTime = #{logoffTime}</if>
-            <if test="appKey != null  and appKey != ''"> and user.appKey = #{appKey}</if>
-            <if test="appSecret != null  and appSecret != ''"> and user.appSecret = #{appSecret}</if>
-            <if test="scanFlag != null "> and user.scanFlag = #{scanFlag}</if>
-            <if test="userBeans != null "> and user.userBeans = #{userBeans}</if>
-            <if test="guideFlag != null "> and user.guideFlag = #{guideFlag}</if>
-            <if test="loginFailTime != null "> and user.loginFailTime = #{loginFailTime}</if>
-            <if test="tipStatus != null  and tipStatus != ''"> and user.tipStatus = #{tipStatus}</if>
-            <if test="onlineMoney != null "> and user.onlineMoney = #{onlineMoney}</if>
-            <if test="unionId != null  and unionId != ''"> and user.unionId = #{unionId}</if>
-            <if test="openId != null  and openId != ''"> and user.openId = #{openId}</if>
+        <where>user.delFlag = 0
+            <if test="userID != null  and userID != ''">and user.userID = #{userID}</if>
+            <if test="userOrganizeID != null ">and user.userOrganizeID = #{userOrganizeID}</if>
+            <if test="account != null  and account != ''">and user.account = #{account}</if>
+            <if test="mobile != null  and mobile != ''">and user.mobile = #{mobile}</if>
+            <if test="bindMobile != null  and bindMobile != ''">and user.bindMobile = #{bindMobile}</if>
+            <if test="userPermission != null ">and user.userPermission = #{userPermission}</if>
+            <if test="userIdentity != null ">and user.userIdentity = #{userIdentity}</if>
+            <if test="email != null  and email != ''">and user.email = #{email}</if>
+            <if test="userName != null  and userName != ''">and user.userName like concat('%', #{userName}, '%')</if>
+            <if test="realName != null  and realName != ''">and user.realName like concat('%', #{realName}, '%')</if>
+            <if test="source != null  and source != ''">and user.source = #{source}</if>
+            <if test="image != null  and image != ''">and user.image = #{image}</if>
+            <if test="password != null  and password != ''">and user.password = #{password}</if>
+            <if test="name != null  and name != ''">and user.name like concat('%', #{name}, '%')</if>
+            <if test="registerUserTypeID != null  and registerUserTypeID != ''">and user.registerUserTypeID =
+                #{registerUserTypeID}
+            </if>
+            <if test="manufacturerStatus != null ">and user.manufacturerStatus = #{manufacturerStatus}</if>
+            <if test="shopID != null ">and user.shopID = #{shopID}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and user.auditStatus = #{auditStatus}</if>
+            <if test="auditTime != null  and auditTime != ''">and user.auditTime = #{auditTime}</if>
+            <if test="auditNote != null  and auditNote != ''">and user.auditNote = #{auditNote}</if>
+            <if test="registerTime != null  and registerTime != ''">and user.registerTime = #{registerTime}</if>
+            <if test="registerIP != null  and registerIP != ''">and user.registerIP = #{registerIP}</if>
+            <if test="ipAddress != null  and ipAddress != ''">and user.ipAddress = #{ipAddress}</if>
+            <if test="loginTime != null  and loginTime != ''">and user.loginTime = #{loginTime}</if>
+            <if test="loginIP != null  and loginIP != ''">and user.loginIP = #{loginIP}</if>
+            <if test="validFlag != null  and validFlag != ''">and user.validFlag = #{validFlag}</if>
+            <if test="clubStatus != null ">and user.clubStatus = #{clubStatus}</if>
+            <if test="clubID != null ">and user.clubID = #{clubID}</if>
+            <if test="agreeFlag != null  and agreeFlag != ''">and user.agreeFlag = #{agreeFlag}</if>
+            <if test="serviceProviderStatus != null ">and user.serviceProviderStatus = #{serviceProviderStatus}</if>
+            <if test="serviceProviderID != null ">and user.serviceProviderID = #{serviceProviderID}</if>
+            <if test="userMoney != null ">and user.userMoney = #{userMoney}</if>
+            <if test="ableUserMoney != null ">and user.ableUserMoney = #{ableUserMoney}</if>
+            <if test="logoffTime != null  and logoffTime != ''">and user.logoffTime = #{logoffTime}</if>
+            <if test="appKey != null  and appKey != ''">and user.appKey = #{appKey}</if>
+            <if test="appSecret != null  and appSecret != ''">and user.appSecret = #{appSecret}</if>
+            <if test="scanFlag != null ">and user.scanFlag = #{scanFlag}</if>
+            <if test="userBeans != null ">and user.userBeans = #{userBeans}</if>
+            <if test="guideFlag != null ">and user.guideFlag = #{guideFlag}</if>
+            <if test="loginFailTime != null ">and user.loginFailTime = #{loginFailTime}</if>
+            <if test="tipStatus != null  and tipStatus != ''">and user.tipStatus = #{tipStatus}</if>
+            <if test="onlineMoney != null ">and user.onlineMoney = #{onlineMoney}</if>
+            <if test="unionId != null  and unionId != ''">and user.unionId = #{unionId}</if>
+            <if test="openId != null  and openId != ''">and user.openId = #{openId}</if>
         </where>
     </select>
 
     <select id="getUserById" parameterType="String" resultMap="UserResult">
         <include refid="selectUserVo"/>
         from user AS user
-        where  user.delFlag = 0 and user.userID = #{userID}
+        where user.delFlag = 0 and user.userID = #{userID}
     </select>
 
 
     <select id="getById" parameterType="User" resultType="String">
         select userID
         from user AS user
-        <where>  user.delFlag = 0
-            <if test="userID != null  and userID != ''"> and user.userID = #{userID}</if>
-            <if test="userOrganizeID != null "> and user.userOrganizeID = #{userOrganizeID}</if>
-            <if test="account != null  and account != ''"> and user.account = #{account}</if>
-            <if test="mobile != null  and mobile != ''"> and user.mobile = #{mobile}</if>
-            <if test="bindMobile != null  and bindMobile != ''"> and user.bindMobile = #{bindMobile}</if>
-            <if test="userPermission != null "> and user.userPermission = #{userPermission}</if>
-            <if test="userIdentity != null "> and user.userIdentity = #{userIdentity}</if>
-            <if test="email != null  and email != ''"> and user.email = #{email}</if>
-            <if test="userName != null  and userName != ''"> and user.userName like concat('%', #{userName}, '%')</if>
-            <if test="realName != null  and realName != ''"> and user.realName like concat('%', #{realName}, '%')</if>
-            <if test="source != null  and source != ''"> and user.source = #{source}</if>
-            <if test="image != null  and image != ''"> and user.image = #{image}</if>
-            <if test="password != null  and password != ''"> and user.password = #{password}</if>
-            <if test="name != null  and name != ''"> and user.name like concat('%', #{name}, '%')</if>
-            <if test="registerUserTypeID != null  and registerUserTypeID != ''"> and user.registerUserTypeID = #{registerUserTypeID}</if>
-            <if test="manufacturerStatus != null "> and user.manufacturerStatus = #{manufacturerStatus}</if>
-            <if test="shopID != null "> and user.shopID = #{shopID}</if>
-            <if test="auditStatus != null  and auditStatus != ''"> and user.auditStatus = #{auditStatus}</if>
-            <if test="auditTime != null  and auditTime != ''"> and user.auditTime = #{auditTime}</if>
-            <if test="auditNote != null  and auditNote != ''"> and user.auditNote = #{auditNote}</if>
-            <if test="registerTime != null  and registerTime != ''"> and user.registerTime = #{registerTime}</if>
-            <if test="registerIP != null  and registerIP != ''"> and user.registerIP = #{registerIP}</if>
-            <if test="ipAddress != null  and ipAddress != ''"> and user.ipAddress = #{ipAddress}</if>
-            <if test="loginTime != null  and loginTime != ''"> and user.loginTime = #{loginTime}</if>
-            <if test="loginIP != null  and loginIP != ''"> and user.loginIP = #{loginIP}</if>
-            <if test="validFlag != null  and validFlag != ''"> and user.validFlag = #{validFlag}</if>
-            <if test="clubStatus != null "> and user.clubStatus = #{clubStatus}</if>
-            <if test="clubID != null "> and user.clubID = #{clubID}</if>
-            <if test="agreeFlag != null  and agreeFlag != ''"> and user.agreeFlag = #{agreeFlag}</if>
-            <if test="serviceProviderStatus != null "> and user.serviceProviderStatus = #{serviceProviderStatus}</if>
-            <if test="serviceProviderID != null "> and user.serviceProviderID = #{serviceProviderID}</if>
-            <if test="userMoney != null "> and user.userMoney = #{userMoney}</if>
-            <if test="ableUserMoney != null "> and user.ableUserMoney = #{ableUserMoney}</if>
-            <if test="logoffTime != null  and logoffTime != ''"> and user.logoffTime = #{logoffTime}</if>
-            <if test="appKey != null  and appKey != ''"> and user.appKey = #{appKey}</if>
-            <if test="appSecret != null  and appSecret != ''"> and user.appSecret = #{appSecret}</if>
-            <if test="scanFlag != null "> and user.scanFlag = #{scanFlag}</if>
-            <if test="userBeans != null "> and user.userBeans = #{userBeans}</if>
-            <if test="guideFlag != null "> and user.guideFlag = #{guideFlag}</if>
-            <if test="loginFailTime != null "> and user.loginFailTime = #{loginFailTime}</if>
-            <if test="tipStatus != null  and tipStatus != ''"> and user.tipStatus = #{tipStatus}</if>
-            <if test="onlineMoney != null "> and user.onlineMoney = #{onlineMoney}</if>
-            <if test="unionId != null  and unionId != ''"> and user.unionId = #{unionId}</if>
-            <if test="openId != null  and openId != ''"> and user.openId = #{openId}</if>
+        <where>user.delFlag = 0
+            <if test="userID != null  and userID != ''">and user.userID = #{userID}</if>
+            <if test="userOrganizeID != null ">and user.userOrganizeID = #{userOrganizeID}</if>
+            <if test="account != null  and account != ''">and user.account = #{account}</if>
+            <if test="mobile != null  and mobile != ''">and user.mobile = #{mobile}</if>
+            <if test="bindMobile != null  and bindMobile != ''">and user.bindMobile = #{bindMobile}</if>
+            <if test="userPermission != null ">and user.userPermission = #{userPermission}</if>
+            <if test="userIdentity != null ">and user.userIdentity = #{userIdentity}</if>
+            <if test="email != null  and email != ''">and user.email = #{email}</if>
+            <if test="userName != null  and userName != ''">and user.userName like concat('%', #{userName}, '%')</if>
+            <if test="realName != null  and realName != ''">and user.realName like concat('%', #{realName}, '%')</if>
+            <if test="source != null  and source != ''">and user.source = #{source}</if>
+            <if test="image != null  and image != ''">and user.image = #{image}</if>
+            <if test="password != null  and password != ''">and user.password = #{password}</if>
+            <if test="name != null  and name != ''">and user.name like concat('%', #{name}, '%')</if>
+            <if test="registerUserTypeID != null  and registerUserTypeID != ''">and user.registerUserTypeID =
+                #{registerUserTypeID}
+            </if>
+            <if test="manufacturerStatus != null ">and user.manufacturerStatus = #{manufacturerStatus}</if>
+            <if test="shopID != null ">and user.shopID = #{shopID}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and user.auditStatus = #{auditStatus}</if>
+            <if test="auditTime != null  and auditTime != ''">and user.auditTime = #{auditTime}</if>
+            <if test="auditNote != null  and auditNote != ''">and user.auditNote = #{auditNote}</if>
+            <if test="registerTime != null  and registerTime != ''">and user.registerTime = #{registerTime}</if>
+            <if test="registerIP != null  and registerIP != ''">and user.registerIP = #{registerIP}</if>
+            <if test="ipAddress != null  and ipAddress != ''">and user.ipAddress = #{ipAddress}</if>
+            <if test="loginTime != null  and loginTime != ''">and user.loginTime = #{loginTime}</if>
+            <if test="loginIP != null  and loginIP != ''">and user.loginIP = #{loginIP}</if>
+            <if test="validFlag != null  and validFlag != ''">and user.validFlag = #{validFlag}</if>
+            <if test="clubStatus != null ">and user.clubStatus = #{clubStatus}</if>
+            <if test="clubID != null ">and user.clubID = #{clubID}</if>
+            <if test="agreeFlag != null  and agreeFlag != ''">and user.agreeFlag = #{agreeFlag}</if>
+            <if test="serviceProviderStatus != null ">and user.serviceProviderStatus = #{serviceProviderStatus}</if>
+            <if test="serviceProviderID != null ">and user.serviceProviderID = #{serviceProviderID}</if>
+            <if test="userMoney != null ">and user.userMoney = #{userMoney}</if>
+            <if test="ableUserMoney != null ">and user.ableUserMoney = #{ableUserMoney}</if>
+            <if test="logoffTime != null  and logoffTime != ''">and user.logoffTime = #{logoffTime}</if>
+            <if test="appKey != null  and appKey != ''">and user.appKey = #{appKey}</if>
+            <if test="appSecret != null  and appSecret != ''">and user.appSecret = #{appSecret}</if>
+            <if test="scanFlag != null ">and user.scanFlag = #{scanFlag}</if>
+            <if test="userBeans != null ">and user.userBeans = #{userBeans}</if>
+            <if test="guideFlag != null ">and user.guideFlag = #{guideFlag}</if>
+            <if test="loginFailTime != null ">and user.loginFailTime = #{loginFailTime}</if>
+            <if test="tipStatus != null  and tipStatus != ''">and user.tipStatus = #{tipStatus}</if>
+            <if test="onlineMoney != null ">and user.onlineMoney = #{onlineMoney}</if>
+            <if test="unionId != null  and unionId != ''">and user.unionId = #{unionId}</if>
+            <if test="openId != null  and openId != ''">and user.openId = #{openId}</if>
         </where>
         group by user.userID
         limit 0,1
     </select>
+    <select id="findClubList" resultType="com.caimei365.manager.entity.caimei.cmUser.CmClub">
+        SELECT
+        a.checkMan as "checkMan",
+        a.clubID AS "clubId",
+        a.userID AS "userId",
+        u.name AS "name",
+        a.sname AS "sname",
+        a.logo AS "logo",
+        a.legalPerson AS "legalPerson",
+        a.provinceID AS "provinceId",
+        a.cityID AS "cityId",
+        a.townID AS "townId",
+        a.flag AS "flag",
+        a.spID AS "spId",
+        a.mainServiceProviderID AS "mainServiceProviderId",
+        a.scanTime AS "scanTime",
+        a.address AS "address",
+        a.linkMan AS "linkMan",
+        a.linkManIdentity AS "linkManIdentity",
+        a.contractPhone AS "contractPhone",
+        a.contractMobile AS "contractMobile",
+        a.fax AS "fax",
+        a.info AS "info",
+        a.addTime AS "addTime",
+        a.auditTime AS "auditTime",
+        a.auditNote AS "auditNote",
+        a.status AS "status",
+        a.businessLicenseImage AS "businessLicenseImage",
+        a.mainpro AS "mainpro",
+        a.scanFlag AS "scanFlag",
+        a.headpic AS "headpic",
+        a.socialCreditCode AS "socialCreditCode",
+        a.lastModify AS "lastModify",
+        a.firstClubType AS "firstClubType",
+        a.secondClubType AS "secondClubType",
+        a.department AS "department",
+        a.medicalPracticeLicenseImg AS "medicalPracticeLicenseImg",
+        a.newDeal as "newDeal",
+        case sp.status when 91 then '采美默认协销经理(官方账号)' else sp.linkMan end AS "spName",
+        d.name AS "province",
+        c.name AS "city",
+        b.name AS "town",
+        u.account AS "account",
+        u.registerTime AS "registerTime",
+        u.registerIP AS "registerIP",
+        u.userName AS "userName",
+        u.bindMobile AS "bindMobile",
+        u.email AS "email",
+        u.userOrganizeID AS "userOrganizeId",
+        u.userIdentity AS "userIdentity",
+        if(csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime,1,0) as svipUserFlag,
+        u.source,
+        coas.activeState,
+        covs.customerValue,
+        u.loginTime
+        FROM club a
+        LEFT JOIN user u ON u.userID = a.userID
+        LEFT JOIN cm_svip_user csu ON csu.userId = u.userID
+        LEFT JOIN serviceprovider sp ON sp.serviceProviderID = a.spID
+        LEFT JOIN town b ON b.townID=a.townID
+        LEFT JOIN city c ON c.cityID=a.cityID
+        LEFT JOIN province d ON d.provinceID=a.provinceID
+        LEFT JOIN (SELECT DISTINCT clubId, createTime FROM cm_provider_record GROUP BY clubId ORDER BY id DESC ) cpr ON
+        a.clubId = cpr.clubId
+        LEFT JOIN (SELECT DISTINCT clubID, checkTime FROM clubchangesprecord WHERE checkStatus = 1 GROUP BY clubID ORDER
+        BY clubChangeSpRecordID DESC )ccs ON ccs.clubId = a.clubId
+        LEFT JOIN (SELECT userID, customerValue FROM cm_organ_value_system WHERE stage = 0 AND delType = 1) covs ON
+        a.userID = covs.userID
+        LEFT JOIN (SELECT userID, activeState FROM cm_organ_active_system WHERE stage = 0 AND delType = 1) AS coas ON
+        coas.userID = a.userID
+        <where>
+            (u.userOrganizeID IN(0,1) or u.clubStatus != 92) and u.userOrganizeID != 4 AND u.userIdentity != 8
+            <if test="clubId != null and clubId != ''">
+                AND a.clubID = #{clubId}
+            </if>
+            <if test="clubId == 0">
+                AND a.clubID = #{clubId}
+            </if>
+            <if test="userId != null and userId != ''">
+                AND a.userID = #{userId}
+            </if>
+            <if test="account != null and account != ''">
+                AND u.account = #{account}
+            </if>
+            <if test="name != null and name != ''">
+                AND u.name LIKE concat('%',#{name},'%')
+            </if>
+            <if test="userName != null and userName != ''">
+                AND u.userName LIKE concat('%',#{userName},'%')
+            </if>
+            <if test="townId != null and townId != ''">
+                AND d.provinceID = #{provinceId}
+            </if>
+            <if test="cityId != null and cityId != ''">
+                AND c.cityID = #{cityId}
+            </if>
+            <if test="townId != null and townId != ''">
+                AND b.townID = #{townId}
+            </if>
+            <if test="status != null and status != ''">
+                AND a.status = #{status}
+            </if>
+            <if test="bindMobile != null and bindMobile != ''">
+                AND u.bindMobile LIKE concat('%',#{bindMobile},'%')
+            </if>
+            <if test="linkMan != null and linkMan != ''">
+                AND a.linkMan LIKE concat('%',#{linkMan},'%')
+            </if>
+            <if test="startTime != null and startTime != ''">
+                AND u.registerTime <![CDATA[ >= ]]> #{startTime}
+            </if>
+            <if test="endTime != null and endTime != ''">
+                AND u.registerTime <![CDATA[ <= ]]> #{endTime}
+            </if>
+            <if test="allocationStartTime != null and allocationStartTime != ''">
+                AND (ccs.checkTime <![CDATA[ >= ]]> #{allocationStartTime}
+                OR cpr.createTime <![CDATA[ >= ]]> #{allocationStartTime})
+            </if>
+            <if test="allocationEndTime != null and allocationEndTime != ''">
+                AND (ccs.checkTime <![CDATA[ <= ]]> #{allocationEndTime}
+                OR cpr.createTime <![CDATA[ <= ]]> #{allocationEndTime})
+            </if>
+            <if test="trendsLabel != null and trendsLabel != ''">
+                AND a.clubId in (select clubId from cm_club_label where label like concat('%', #{trendsLabel}, '%') AND
+                dynamicStatus = 0)
+            </if>
+            <if test="stateLabel != null and stateLabel != ''">
+                AND a.clubId in (select clubId from cm_club_label where label like concat('%', #{stateLabel}, '%') AND
+                dynamicStatus = 1)
+            </if>
+            <if test="labelStartTime != null and labelStartTime != ''">
+                AND a.clubId in (select clubId from cm_club_label where addTime <![CDATA[ >= ]]> #{labelStartTime})
+            </if>
+            <if test="labelEndTime != null and labelEndTime != ''">
+                AND a.clubId in (select clubId from cm_club_label where addTime <![CDATA[ <= ]]> #{labelEndTime})
+            </if>
+            <if test="startLoginTime != null and startLoginTime != ''">
+                AND (u.loginTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) OR a.clubId in (select a.clubId
+                FROM ((
+                select
+                c.clubId,ccr.addTime AS time,c.spID
+                FROM club c
+                LEFT JOIN user u ON u.userID = c.userID
+                LEFT JOIN cm_club_remarks ccr ON ccr.clubId = c.clubId
+                LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+                where c.status=90 and sp.status=90
+                and ccr.addTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
+                GROUP BY c.clubId
+                )UNION(
+                select c.clubId,cr.orderTime AS time,c.spID
+                FROM club c
+                LEFT JOIN user u ON u.userID = c.userID
+                LEFT JOIN cm_order cr ON cr.clubId = c.clubId
+                LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+                where c.status=90 and sp.status=90
+                and cr.orderTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
+                GROUP BY c.clubId
+                )) a where a.time is not null
+                and a.spID=#{spId}
+                GROUP BY a.clubId ))
+            </if>
+            <if test="endLoginTime != null and endLoginTime != ''">
+                AND (u.loginTime <![CDATA[ < ]]> DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH) or u.loginTime is null) and
+                a.clubId not in (select a.clubId
+                FROM ((
+                select
+                c.clubId,ccr.addTime AS time,c.spID
+                FROM club c
+                LEFT JOIN user u ON u.userID = c.userID
+                LEFT JOIN cm_club_remarks ccr ON ccr.clubId = c.clubId
+                LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+                where c.status=90 and sp.status=90
+                and ccr.addTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
+                GROUP BY c.clubId
+                )UNION(
+                select c.clubId,cr.orderTime AS time,c.spID
+                FROM club c
+                LEFT JOIN user u ON u.userID = c.userID
+                LEFT JOIN cm_order cr ON cr.clubId = c.clubId
+                LEFT JOIN serviceprovider sp ON sp.serviceProviderID = c.spID
+                where c.status=90 and sp.status=90
+                and cr.orderTime >= DATE_SUB(CURRENT_DATE, INTERVAL 6 MONTH)
+                GROUP BY c.clubId
+                )) a where a.time is not null
+                and a.spID=#{spId}
+                GROUP BY a.clubId )
+            </if>
+            <if test="userIdentity != null and userIdentity != '' and userIdentity != '8'.toString()">
+                AND u.userIdentity = #{userIdentity}
+            </if>
+            <if test="userIdentity != null and userIdentity != '' and userIdentity == '8'.toString()">
+                AND csu.delFlag = '0' and now() <![CDATA[ < ]]> csu.endTime
+            </if>
+            <if test="newDeal != null">
+                AND a.newDeal =#{newDeal}
+            </if>
+            <if test="activeState != null and activeState != ''">
+                AND coas.activeState = #{activeState}
+            </if>
+            <if test="customerValue != null and customerValue != ''">
+                AND covs.customerValue = #{customerValue}
+            </if>
+            <if test="spID != null and spID != ''">
+                AND sp.serviceProviderID = #{spId}
+            </if>
+        </where>
+        ORDER BY case when a.status = 91 then 0 else 1 end desc, a.addTime DESC
+    </select>
+
+    <select id="findLabels" resultType="com.caimei365.manager.entity.caimei.cmUser.CmClubLabel">
+        SELECT label, dynamicStatus
+        FROM cm_club_label
+        where dynamicStatus = #{dynamicStatus}
+    </select>
 
     <insert id="addUser" parameterType="User" useGeneratedKeys="true" keyProperty="userID">
         insert into user
@@ -428,7 +649,9 @@
             <if test="image != null and image != ''">image = #{image},</if>
             <if test="password != null and password != ''">password = #{password},</if>
             <if test="name != null and name != ''">name = #{name},</if>
-            <if test="registerUserTypeID != null and registerUserTypeID != ''">registerUserTypeID = #{registerUserTypeID},</if>
+            <if test="registerUserTypeID != null and registerUserTypeID != ''">registerUserTypeID =
+                #{registerUserTypeID},
+            </if>
             <if test="manufacturerStatus != null">manufacturerStatus = #{manufacturerStatus},</if>
             <if test="shopID != null">shopID = #{shopID},</if>
             <if test="auditStatus != null and auditStatus != ''">auditStatus = #{auditStatus},</if>
@@ -464,57 +687,60 @@
 
     <delete id="delUserByUserID" parameterType="String">
         delete
-        from user where userID = #{userID}
+        from user
+        where userID = #{userID}
     </delete>
 
     <delete id="delUser" parameterType="User">
         delete
         from user AS user
         <where>
-            <if test="userID != null  and userID != ''"> and user.userID = #{userID}</if>
-            <if test="userOrganizeID != null "> and user.userOrganizeID = #{userOrganizeID}</if>
-            <if test="account != null  and account != ''"> and user.account = #{account}</if>
-            <if test="mobile != null  and mobile != ''"> and user.mobile = #{mobile}</if>
-            <if test="bindMobile != null  and bindMobile != ''"> and user.bindMobile = #{bindMobile}</if>
-            <if test="userPermission != null "> and user.userPermission = #{userPermission}</if>
-            <if test="userIdentity != null "> and user.userIdentity = #{userIdentity}</if>
-            <if test="email != null  and email != ''"> and user.email = #{email}</if>
-            <if test="userName != null  and userName != ''"> and user.userName like concat('%', #{userName}, '%')</if>
-            <if test="realName != null  and realName != ''"> and user.realName like concat('%', #{realName}, '%')</if>
-            <if test="source != null  and source != ''"> and user.source = #{source}</if>
-            <if test="image != null  and image != ''"> and user.image = #{image}</if>
-            <if test="password != null  and password != ''"> and user.password = #{password}</if>
-            <if test="name != null  and name != ''"> and user.name like concat('%', #{name}, '%')</if>
-            <if test="registerUserTypeID != null  and registerUserTypeID != ''"> and user.registerUserTypeID = #{registerUserTypeID}</if>
-            <if test="manufacturerStatus != null "> and user.manufacturerStatus = #{manufacturerStatus}</if>
-            <if test="shopID != null "> and user.shopID = #{shopID}</if>
-            <if test="auditStatus != null  and auditStatus != ''"> and user.auditStatus = #{auditStatus}</if>
-            <if test="auditTime != null  and auditTime != ''"> and user.auditTime = #{auditTime}</if>
-            <if test="auditNote != null  and auditNote != ''"> and user.auditNote = #{auditNote}</if>
-            <if test="registerTime != null  and registerTime != ''"> and user.registerTime = #{registerTime}</if>
-            <if test="registerIP != null  and registerIP != ''"> and user.registerIP = #{registerIP}</if>
-            <if test="ipAddress != null  and ipAddress != ''"> and user.ipAddress = #{ipAddress}</if>
-            <if test="loginTime != null  and loginTime != ''"> and user.loginTime = #{loginTime}</if>
-            <if test="loginIP != null  and loginIP != ''"> and user.loginIP = #{loginIP}</if>
-            <if test="validFlag != null  and validFlag != ''"> and user.validFlag = #{validFlag}</if>
-            <if test="clubStatus != null "> and user.clubStatus = #{clubStatus}</if>
-            <if test="clubID != null "> and user.clubID = #{clubID}</if>
-            <if test="agreeFlag != null  and agreeFlag != ''"> and user.agreeFlag = #{agreeFlag}</if>
-            <if test="serviceProviderStatus != null "> and user.serviceProviderStatus = #{serviceProviderStatus}</if>
-            <if test="serviceProviderID != null "> and user.serviceProviderID = #{serviceProviderID}</if>
-            <if test="userMoney != null "> and user.userMoney = #{userMoney}</if>
-            <if test="ableUserMoney != null "> and user.ableUserMoney = #{ableUserMoney}</if>
-            <if test="logoffTime != null  and logoffTime != ''"> and user.logoffTime = #{logoffTime}</if>
-            <if test="appKey != null  and appKey != ''"> and user.appKey = #{appKey}</if>
-            <if test="appSecret != null  and appSecret != ''"> and user.appSecret = #{appSecret}</if>
-            <if test="scanFlag != null "> and user.scanFlag = #{scanFlag}</if>
-            <if test="userBeans != null "> and user.userBeans = #{userBeans}</if>
-            <if test="guideFlag != null "> and user.guideFlag = #{guideFlag}</if>
-            <if test="loginFailTime != null "> and user.loginFailTime = #{loginFailTime}</if>
-            <if test="tipStatus != null  and tipStatus != ''"> and user.tipStatus = #{tipStatus}</if>
-            <if test="onlineMoney != null "> and user.onlineMoney = #{onlineMoney}</if>
-            <if test="unionId != null  and unionId != ''"> and user.unionId = #{unionId}</if>
-            <if test="openId != null  and openId != ''"> and user.openId = #{openId}</if>
+            <if test="userID != null  and userID != ''">and user.userID = #{userID}</if>
+            <if test="userOrganizeID != null ">and user.userOrganizeID = #{userOrganizeID}</if>
+            <if test="account != null  and account != ''">and user.account = #{account}</if>
+            <if test="mobile != null  and mobile != ''">and user.mobile = #{mobile}</if>
+            <if test="bindMobile != null  and bindMobile != ''">and user.bindMobile = #{bindMobile}</if>
+            <if test="userPermission != null ">and user.userPermission = #{userPermission}</if>
+            <if test="userIdentity != null ">and user.userIdentity = #{userIdentity}</if>
+            <if test="email != null  and email != ''">and user.email = #{email}</if>
+            <if test="userName != null  and userName != ''">and user.userName like concat('%', #{userName}, '%')</if>
+            <if test="realName != null  and realName != ''">and user.realName like concat('%', #{realName}, '%')</if>
+            <if test="source != null  and source != ''">and user.source = #{source}</if>
+            <if test="image != null  and image != ''">and user.image = #{image}</if>
+            <if test="password != null  and password != ''">and user.password = #{password}</if>
+            <if test="name != null  and name != ''">and user.name like concat('%', #{name}, '%')</if>
+            <if test="registerUserTypeID != null  and registerUserTypeID != ''">and user.registerUserTypeID =
+                #{registerUserTypeID}
+            </if>
+            <if test="manufacturerStatus != null ">and user.manufacturerStatus = #{manufacturerStatus}</if>
+            <if test="shopID != null ">and user.shopID = #{shopID}</if>
+            <if test="auditStatus != null  and auditStatus != ''">and user.auditStatus = #{auditStatus}</if>
+            <if test="auditTime != null  and auditTime != ''">and user.auditTime = #{auditTime}</if>
+            <if test="auditNote != null  and auditNote != ''">and user.auditNote = #{auditNote}</if>
+            <if test="registerTime != null  and registerTime != ''">and user.registerTime = #{registerTime}</if>
+            <if test="registerIP != null  and registerIP != ''">and user.registerIP = #{registerIP}</if>
+            <if test="ipAddress != null  and ipAddress != ''">and user.ipAddress = #{ipAddress}</if>
+            <if test="loginTime != null  and loginTime != ''">and user.loginTime = #{loginTime}</if>
+            <if test="loginIP != null  and loginIP != ''">and user.loginIP = #{loginIP}</if>
+            <if test="validFlag != null  and validFlag != ''">and user.validFlag = #{validFlag}</if>
+            <if test="clubStatus != null ">and user.clubStatus = #{clubStatus}</if>
+            <if test="clubID != null ">and user.clubID = #{clubID}</if>
+            <if test="agreeFlag != null  and agreeFlag != ''">and user.agreeFlag = #{agreeFlag}</if>
+            <if test="serviceProviderStatus != null ">and user.serviceProviderStatus = #{serviceProviderStatus}</if>
+            <if test="serviceProviderID != null ">and user.serviceProviderID = #{serviceProviderID}</if>
+            <if test="userMoney != null ">and user.userMoney = #{userMoney}</if>
+            <if test="ableUserMoney != null ">and user.ableUserMoney = #{ableUserMoney}</if>
+            <if test="logoffTime != null  and logoffTime != ''">and user.logoffTime = #{logoffTime}</if>
+            <if test="appKey != null  and appKey != ''">and user.appKey = #{appKey}</if>
+            <if test="appSecret != null  and appSecret != ''">and user.appSecret = #{appSecret}</if>
+            <if test="scanFlag != null ">and user.scanFlag = #{scanFlag}</if>
+            <if test="userBeans != null ">and user.userBeans = #{userBeans}</if>
+            <if test="guideFlag != null ">and user.guideFlag = #{guideFlag}</if>
+            <if test="loginFailTime != null ">and user.loginFailTime = #{loginFailTime}</if>
+            <if test="tipStatus != null  and tipStatus != ''">and user.tipStatus = #{tipStatus}</if>
+            <if test="onlineMoney != null ">and user.onlineMoney = #{onlineMoney}</if>
+            <if test="unionId != null  and unionId != ''">and user.unionId = #{unionId}</if>
+            <if test="openId != null  and openId != ''">and user.openId = #{openId}</if>
         </where>
     </delete>