Просмотр исходного кода

Merge branch 'refs/heads/master' into ScrmStores

吴树波 1 неделя назад
Родитель
Сommit
e57c6437df

+ 6 - 0
fs-admin/src/main/java/com/fs/his/controller/FsCityController.java

@@ -129,4 +129,10 @@ public class FsCityController extends BaseController
         return R.ok().put("data",fsCityService.getCitysArea());
     }
 
+    @GetMapping("/getAllList")
+    public R getAllList(FsCity fsCity)
+    {
+        List<FsCity> list = fsCityService.selectFsCityList(fsCity);
+        return R.ok().put("data",list);
+    }
 }

+ 15 - 2
fs-admin/src/main/java/com/fs/his/controller/FsUserController.java

@@ -140,8 +140,21 @@ public class FsUserController extends BaseController
     {
         startPage();
         List<FsUserVO> list = fsUserService.selectFsUserVOListByProject(fsUser);
-        for (FsUserVO vo : list){
-            vo.setPhone(ParseUtils.parsePhone(vo.getPhone()));
+        boolean checkPhone = isCheckPhone();
+        for (FsUserVO fsUserVO : list) {
+            if(fsUserVO.getPhone() != null&&fsUserVO.getPhone()!=""){
+                if (!checkPhone){
+                    if (fsUserVO.getPhone().length()>11){
+                        fsUserVO.setPhone(decryptPhoneMk(fsUserVO.getPhone()));
+                    }else {
+                        fsUserVO.setPhone(fsUserVO.getPhone().replaceAll("(\\d{3})\\d*(\\d{4})", "$1****$2"));
+                    }
+                } else {
+                    if (fsUserVO.getPhone().length()>11) {
+                        fsUserVO.setPhone(decryptPhone(fsUserVO.getPhone()));
+                    }
+                }
+            }
         }
         return getDataTable(list);
     }

+ 3 - 0
fs-common/src/main/java/com/fs/common/core/redis/RedisCache.java

@@ -233,4 +233,7 @@ public class RedisCache
     }
 
 
+    public Boolean setIfAbsent(String key, String value, long timeout, TimeUnit unit) {
+        return redisTemplate.opsForValue().setIfAbsent(key, value, timeout, unit);
+    }
 }

+ 1 - 1
fs-company-app/src/main/java/com/fs/app/controller/UserController.java

@@ -216,7 +216,7 @@ public class UserController extends AppBaseController {
             result.put("perms", perms);
             return R.ok("登录成功").put("data", result);
         } catch (Exception e) {
-            return R.error("登录异常");
+            return R.error("登录异常:"+e.getMessage());
         }
     }
 

+ 0 - 59
fs-company/src/main/java/com/fs/hisStore/controller/FsCityScrmController.java

@@ -1,59 +0,0 @@
-package com.fs.hisStore.controller;
-
-import com.fs.common.core.controller.BaseController;
-import com.fs.common.core.domain.R;
-import com.fs.hisStore.domain.FsCityScrm;
-import com.fs.hisStore.service.IFsCityScrmService;
-import com.fs.store.utils.CityTreeUtil;
-import com.fs.store.vo.CityVO;
-import com.google.common.collect.Lists;
-import io.swagger.annotations.ApiOperation;
-import org.springframework.beans.factory.annotation.Autowired;
-import org.springframework.web.bind.annotation.GetMapping;
-import org.springframework.web.bind.annotation.RequestMapping;
-import org.springframework.web.bind.annotation.RestController;
-import springfox.documentation.annotations.Cacheable;
-
-import javax.servlet.http.HttpServletRequest;
-import java.util.List;
-
-/**
- * 城市Controller
- *
- * @author fs
- * @date 2022-03-15
- */
-@RestController
-@RequestMapping("/store/store/city")
-public class FsCityScrmController extends BaseController
-{
-    @Autowired
-    private IFsCityScrmService fsCityService;
-
-//
-//    @GetMapping("/getAllList")
-//    @Cacheable("citys")
-//    public R getAllList(FsCityScrm fsCity)
-//    {
-//        List<FsCityScrm> list = fsCityService.selectFsCityList(fsCity);
-//        return R.ok().put("data",list);
-//    }
-
-
-    @ApiOperation("获取城市数据")
-    @GetMapping("/getCitys")
-    @Cacheable("citys")
-    public R getCitys(HttpServletRequest request){
-        List<FsCityScrm> list=fsCityService.selectFsCitys();
-        List<CityVO> cityVOS = Lists.newArrayList();
-        for (FsCityScrm city : list){
-            CityVO cityVO = new CityVO();
-            cityVO.setValue(Long.parseLong(city.getCityId()));
-            cityVO.setLabel(city.getCityName());
-            cityVO.setPid(Long.parseLong(city.getParentId()));
-            cityVOS.add(cityVO);
-        }
-        return R.ok().put("data", CityTreeUtil.list2TreeConverter(cityVOS, 0));
-
-    }
-}

+ 11 - 2
fs-service/src/main/java/com/fs/course/service/impl/FsUserCourseVideoServiceImpl.java

@@ -1515,9 +1515,18 @@ public class FsUserCourseVideoServiceImpl implements IFsUserCourseVideoService
     @Transactional
     public ResponseResult<FsUser> isAddCompanyUser(FsUserCourseAddCompanyUserParam param) {
         logger.info("\n 【进入个微-判断是否添加客服】,入参:{}",param);
+
+        // 生成锁的key,使用用户ID和视频ID组合
+        String lockKey = "submit:lock:" + param.getUserId() + ":" + param.getVideoId();
+        // 尝试获取锁,3秒过期
+        boolean locked = redisCache.setIfAbsent(lockKey, "1", 1, TimeUnit.SECONDS);
+
+        if (!locked) {
+            return ResponseResult.fail(504, "请勿重复提交,请等待3秒后重试");
+        }
         //查询用户
-        FsUser fsUser = fsUserMapper.selectFsUserById(param.getUserId());
-        if (fsUser == null){
+       FsUser fsUser = fsUserMapper.selectFsUserById(param.getUserId());
+         if (fsUser == null){
             return ResponseResult.fail(404,"当前用户信息不存在");
         }
         //公开课

+ 1 - 6
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -80,10 +80,7 @@ public interface FsUserMapper
      */
     public int deleteFsUserByUserIds(Long[] userIds);
     @Select({"<script> " +
-                "select f1.*,f2.nick_name tui_name,f2.phone tui_phone,cu.nick_name AS companyUserNickName,co.company_name FROM fs_user f1 LEFT JOIN fs_user f2 ON f1.tui_user_id =f2.user_id "+
-            " LEFT JOIN fs_user_company_user cuc ON cuc.user_id = f1.user_id\n" +
-            " LEFT JOIN company_user cu ON cu.user_id = cuc.company_user_id\n" +
-            " LEFT JOIN company co ON co.company_id = cuc.company_id "+
+                "select f1.*,f2.nick_name tui_name,f2.phone tui_phone FROM fs_user f1 LEFT JOIN fs_user f2 ON f1.tui_user_id =f2.user_id "+
             " where f1.is_del=0 "+
             "  <if test=\"nickName != null  and nickName != ''\"> and f1.nick_name like concat( #{nickName}, '%')</if>\n" +
             "            <if test=\"avatar != null  and avatar != ''\"> and f1.avatar = #{avatar}</if>\n" +
@@ -99,8 +96,6 @@ public interface FsUserMapper
             "            <if test=\"loginDevice != null  and loginDevice != ''\"> and f1.login_device = #{loginDevice}</if>\n" +
             "            <if test=\"sTime != null \">  and DATE(f1.create_time) &gt;= DATE(#{sTime})</if>\n" +
             "            <if test=\"eTime != null \">  and DATE(f1.create_time) &lt;= DATE(#{eTime})</if>\n" +
-            "            <if test=\"companyId != null \">and co.company_id = #{companyId}</if>\n" +
-            "            <if test=\"companyUserId != null \">and cuc.company_user_id = #{companyUserId}</if>\n" +
             "order by f1.user_id desc"+
             "</script>"})
     @Results({

+ 97 - 97
fs-service/src/main/java/com/fs/his/service/impl/FsPackageOrderServiceImpl.java

@@ -341,106 +341,106 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
             return R.error("无效的类型参数");
         }
     }
-    public Map<String,Object> computeOrderMoney(BigDecimal orderPrice,FsPackageOrderComputeParam param){
-        Map<String,Object> moneys=new HashMap<>();
-        BigDecimal payPrice=orderPrice;
-        BigDecimal payMoney=new BigDecimal(0);
-        BigDecimal payRemain=new BigDecimal(0);
-        BigDecimal payDelivery=new BigDecimal(0);
-        BigDecimal discountMoney=new BigDecimal(0);
-        String json=configService.selectConfigByKey("his.package");
-        PackageConfigDTO configDTO=JSONUtil.toBean(json, PackageConfigDTO.class);
-        if(param.getUserCouponId()!=null&&param.getUserCouponId()>0l){
-            FsUserCoupon userCoupon=userCouponService.selectFsUserCouponById(param.getUserCouponId());
-            if(userCoupon==null){
-
-            }
-            if(userCoupon.getStatus()!=0){
+    public Map<String, Object> computeOrderMoney(BigDecimal orderPrice, FsPackageOrderComputeParam param) {
+        Map<String, Object> moneys = new HashMap<>();
+        BigDecimal payPrice = orderPrice;
+        BigDecimal payMoney = new BigDecimal(0);
+        BigDecimal payRemain = new BigDecimal(0);
+        BigDecimal payDelivery = new BigDecimal(0);
+        BigDecimal discountMoney = new BigDecimal(0);
+        String json = configService.selectConfigByKey("his.package");
+        PackageConfigDTO configDTO = JSONUtil.toBean(json, PackageConfigDTO.class);
+        if (param.getUserCouponId() != null && param.getUserCouponId() > 0l) {
+            FsUserCoupon userCoupon = userCouponService.selectFsUserCouponById(param.getUserCouponId());
+            if (userCoupon != null) {
+                if (userCoupon.getStatus() == 0) {
+                    FsCoupon coupon = couponService.selectFsCouponByCouponId(userCoupon.getCouponId());
+                    if (coupon.getCouponType().equals(1)) {
+                        if (coupon.getMinPrice().compareTo(orderPrice) <=0) {
+                            if (coupon.getPrice().compareTo(orderPrice) >= 0) {
+                                payPrice = new BigDecimal(0);
+                                discountMoney = coupon.getPrice();
+                            } else {
+                                payPrice = orderPrice.subtract(coupon.getPrice());
+                                discountMoney = coupon.getPrice();
+                            }
+                        }
+                        //中药免单券
+                    } else if (coupon.getCouponType().equals(2)) {
+                        payPrice = new BigDecimal(0);
+                        discountMoney = orderPrice;
+                        //问诊免单券
+                    } else if (coupon.getCouponType().equals(3)) {
+
+                        //中药打折券
+                    } else if (coupon.getCouponType().equals(4)) {
+                        payPrice = orderPrice.multiply(coupon.getRate()).divide(new BigDecimal(100));
+                        discountMoney = coupon.getPrice().subtract(orderPrice);
+                        //私域疗法券
+                    } else if (coupon.getCouponType().equals(5)) {
+                        if (coupon.getMinPrice().compareTo(orderPrice) <=0) {
+                            if (coupon.getPrice().compareTo(orderPrice) >= 0) {
+                                payPrice = new BigDecimal(0);
+                                discountMoney = coupon.getPrice();
+                            } else {
+                                payPrice = orderPrice.subtract(coupon.getPrice());
+                                discountMoney = coupon.getPrice();
 
-            }
-            FsCoupon coupon=couponService.selectFsCouponByCouponId(userCoupon.getCouponId());
-            if(coupon.getCouponType().equals(1)){
-                if(coupon.getMinPrice().compareTo(orderPrice)==1){
-
-                }
-                if(coupon.getPrice().compareTo(orderPrice)>=0){
-                    payPrice=new BigDecimal(0);
-                    discountMoney=coupon.getPrice();
-                }
-                else{
-                    payPrice=orderPrice.subtract(coupon.getPrice());
-                    discountMoney=coupon.getPrice();
 
+                            }
+                        }
+                        //公域疗法券
+                    }else if (coupon.getCouponType().equals(6)){
+                        if (coupon.getMinPrice().compareTo(orderPrice) >=0) {
+                            //throw  new ServiceException("优惠劵最低金额大于订单金额");
 
+                        }
+                        if (coupon.getPrice().compareTo(orderPrice) >= 0) {
+                            payPrice = new BigDecimal(0);
+                            discountMoney = coupon.getPrice();
+                        } else {
+                            payPrice = orderPrice.subtract(coupon.getPrice());
+                            discountMoney = coupon.getPrice();
+                        }
+                    }
                 }
             }
-            else if(coupon.getCouponType().equals(2)){
-                payPrice=new BigDecimal(0);
-                discountMoney=orderPrice;
-
-            }
-            else if(coupon.getCouponType().equals(3)){
-
-
-            }
-            else if(coupon.getCouponType().equals(4)){
-                payPrice= orderPrice.multiply(coupon.getRate()).divide(new BigDecimal(100));
-                discountMoney=coupon.getPrice().subtract(orderPrice);
 
-            }
-            else if(coupon.getCouponType().equals(5)){
-                if(coupon.getMinPrice().compareTo(orderPrice)==1){
 
-                }
-                if(coupon.getPrice().compareTo(orderPrice)>=0){
-                    payPrice=new BigDecimal(0);
-                    discountMoney=coupon.getPrice();
-                }
-                else{
-                    payPrice=orderPrice.subtract(coupon.getPrice());
-                    discountMoney=coupon.getPrice();
-
-
-                }
-
-            }
-        }
-        else{
-            payPrice=orderPrice;
-            discountMoney=new BigDecimal(0);
+        } else {
+            payPrice = orderPrice;
+            discountMoney = new BigDecimal(0);
         }
 
-        if(payPrice.compareTo(new BigDecimal(0))==1){
-            if(param.getPayType().equals(1)){
+        if (payPrice.compareTo(new BigDecimal(0)) == 1) {
+            if (param.getPayType().equals(1)) {
                 //全款
-                payMoney=payPrice;
-                payRemain=new BigDecimal(0);
-                payDelivery=new BigDecimal(0);
+                payMoney = payPrice;
+                payRemain = new BigDecimal(0);
+                payDelivery = new BigDecimal(0);
 
-            }
-            else if (param.getPayType().equals(2)){
+            } else if (param.getPayType().equals(2)) {
                 //代收
-                payMoney= payPrice.multiply(new BigDecimal((100-configDTO.getPayRate()))).divide(new BigDecimal(100));
-                payMoney=new BigDecimal(payMoney.setScale(0, BigDecimal.ROUND_HALF_UP).longValue());
-                payRemain=payPrice.subtract(payMoney);
-                payDelivery=new BigDecimal(0);
-                if(payRemain.compareTo(new BigDecimal(0))==0){
-                    throw  new CustomException("代收金额应大于0");
+                payMoney = payPrice.multiply(new BigDecimal((100 - configDTO.getPayRate()))).divide(new BigDecimal(100));
+                payMoney = new BigDecimal(payMoney.setScale(0, BigDecimal.ROUND_HALF_UP).longValue());
+                payRemain = payPrice.subtract(payMoney);
+                payDelivery = new BigDecimal(0);
+                if (payRemain.compareTo(new BigDecimal(0)) == 0) {
+                    throw new CustomException("代收金额应大于0");
                 }
-            }
-            else if(param.getPayType().equals(3)){
+            } else if (param.getPayType().equals(3)) {
                 //货到付款
-                payMoney=configDTO.getPayDelivery();
-                payPrice=payPrice.add(configDTO.getPayDelivery());
-                payRemain=payPrice.subtract(configDTO.getPayDelivery());
-                payDelivery=configDTO.getPayDelivery();
+                payMoney = configDTO.getPayDelivery();
+                payPrice = payPrice.add(configDTO.getPayDelivery());
+                payRemain = payPrice.subtract(configDTO.getPayDelivery());
+                payDelivery = configDTO.getPayDelivery();
             }
         }
-        moneys.put("payPrice",payPrice);
-        moneys.put("payMoney",payMoney);
-        moneys.put("payRemain",payRemain);
-        moneys.put("payDelivery",payDelivery);
-        moneys.put("discountMoney",discountMoney);
+        moneys.put("payPrice", payPrice);
+        moneys.put("payMoney", payMoney);
+        moneys.put("payRemain", payRemain);
+        moneys.put("payDelivery", payDelivery);
+        moneys.put("discountMoney", discountMoney);
         List<StoreOrderProductDTO> gifts=new ArrayList<>();
         if(configDTO.getGiftStoreId()!=null&&param.getStoreId()!=null&&configDTO.getGiftStoreId().equals(param.getStoreId())&&param.getPayType()==1&&param.getCompanyId()!=null&&param.getCompanyUserId()!=null&&param.getCompanyId()>0&&payPrice.compareTo(configDTO.getGiftPrice())>=0){
             gifts=configDTO.getGift();
@@ -613,6 +613,19 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
             computeParam.setUserCouponId(order.getUserCouponId());
         }
 
+        Map<String,Object> moneys=computeOrderMoney(order.getTotalPrice(),computeParam);
+        fsPackageOrder.setPayMoney((BigDecimal)moneys.get("payMoney"));
+        fsPackageOrder.setPayPrice((BigDecimal)moneys.get("payPrice"));
+        fsPackageOrder.setPayDelivery((BigDecimal)moneys.get("payDelivery"));
+        if (param.getUserCouponId()!=null&&param.getUserCouponId()>0){
+            fsPackageOrder.setUserCouponId(param.getUserCouponId());
+
+        }
+        fsPackageOrder.setDiscountMoney((BigDecimal)moneys.get("discountMoney"));
+        fsPackageOrder.setPayRemain((BigDecimal)moneys.get("payRemain"));
+        fsPackageOrder.setPayType(param.getPayType());
+        fsPackageOrderMapper.updateFsPackageOrder(fsPackageOrder);
+
         if (param.getUserCouponId()!=null&&param.getUserCouponId()>0){
             FsUserCoupon userCoupon=userCouponService.selectFsUserCouponById(param.getUserCouponId());
             FsCoupon coupon=couponService.selectFsCouponByCouponId(userCoupon.getCouponId());
@@ -626,19 +639,6 @@ public class FsPackageOrderServiceImpl implements IFsPackageOrderService
             userCouponService.updateFsUserCoupon(userCoupon);
         }
 
-
-        Map<String,Object> moneys=computeOrderMoney(order.getTotalPrice(),computeParam);
-        fsPackageOrder.setPayMoney((BigDecimal)moneys.get("payMoney"));
-        fsPackageOrder.setPayPrice((BigDecimal)moneys.get("payPrice"));
-        fsPackageOrder.setPayDelivery((BigDecimal)moneys.get("payDelivery"));
-        if (param.getUserCouponId()!=null&&param.getUserCouponId()>0){
-            fsPackageOrder.setUserCouponId(param.getUserCouponId());
-
-        }
-        fsPackageOrder.setDiscountMoney((BigDecimal)moneys.get("discountMoney"));
-        fsPackageOrder.setPayRemain((BigDecimal)moneys.get("payRemain"));
-        fsPackageOrder.setPayType(param.getPayType());
-        fsPackageOrderMapper.updateFsPackageOrder(fsPackageOrder);
         return R.ok();
 
     }

+ 4 - 0
fs-service/src/main/java/com/fs/his/vo/FsUserVO.java

@@ -161,4 +161,8 @@ public class FsUserVO extends FsUser implements Serializable
 
     @ApiModelProperty(value = "销售用户关联id")
     private Long companyUserId;
+
+    @ApiModelProperty(value = "绑定时间")
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date bindTime;
 }

+ 12 - 8
fs-service/src/main/java/com/fs/hisStore/service/impl/FsShippingTemplatesScrmServiceImpl.java

@@ -25,7 +25,7 @@ import com.fs.hisStore.service.IFsShippingTemplatesScrmService;
 
 /**
  * 运费模板Service业务层处理
- * 
+ *
  * @author fs
  * @date 2022-03-15
  */
@@ -45,7 +45,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 查询运费模板
-     * 
+     *
      * @param shippingId 运费模板ID
      * @return 运费模板
      */
@@ -57,7 +57,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 查询运费模板列表
-     * 
+     *
      * @param fsShippingTemplates 运费模板
      * @return 运费模板
      */
@@ -69,7 +69,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 新增运费模板
-     * 
+     *
      * @param fsShippingTemplates 运费模板
      * @return 结果
      */
@@ -82,7 +82,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 修改运费模板
-     * 
+     *
      * @param fsShippingTemplates 运费模板
      * @return 结果
      */
@@ -95,7 +95,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 批量删除运费模板
-     * 
+     *
      * @param shippingIds 需要删除的运费模板ID
      * @return 结果
      */
@@ -107,7 +107,7 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
 
     /**
      * 删除运费模板信息
-     * 
+     *
      * @param shippingId 运费模板ID
      * @return 结果
      */
@@ -123,7 +123,11 @@ public class FsShippingTemplatesScrmServiceImpl implements IFsShippingTemplatesS
             throw new CustomException("请指定包邮地区");
         }
         FsShippingTemplatesScrm shippingTemplates = new FsShippingTemplatesScrm();
-        BeanUtil.copyProperties(fsShippingTemplates,shippingTemplates);
+        shippingTemplates.setId(fsShippingTemplates.getId());
+        shippingTemplates.setName(fsShippingTemplates.getName());
+        shippingTemplates.setType(fsShippingTemplates.getType());
+        shippingTemplates.setSort(fsShippingTemplates.getSort());
+        shippingTemplates.setAppoint(fsShippingTemplates.getAppoint());
         shippingTemplates.setRegionInfo(JSON.toJSONString(fsShippingTemplates.getRegionInfo()));
         shippingTemplates.setAppointInfo(JSON.toJSONString(fsShippingTemplates.getAppointInfo()));
         if(fsShippingTemplates.getId() != null && fsShippingTemplates.getId()  > 0){

+ 1 - 1
fs-service/src/main/resources/application-config-druid-hyt.yml

@@ -67,7 +67,7 @@ tencent_cloud_config:
   secret_key: u5SuS80342xzx8FRBukza9lVNHKNMSaB
   bucket: fzhyt-1323137866
   app_id: 1323137866
-  region: ap-guangzhou
+  region: ap-chongqing
   proxy: fzhyt
 cloud_host:
   company_name: 宏医堂

+ 12 - 0
fs-service/src/main/resources/db/20250822-项目会员状态.sql

@@ -0,0 +1,12 @@
+-- 字典
+INSERT INTO `sys_dict_type`
+(`dict_name`, `dict_type`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES
+    ('项目会员状态', 'project_user_status', '0', 'admin', '2021-11-24 23:26:40', '', NULL, '项目会员状态');
+
+INSERT INTO `sys_dict_data`
+(`dict_sort`, `dict_label`, `dict_value`, `dict_type`, `css_class`, `list_class`, `is_default`, `status`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
+VALUES
+    (1, '小黑屋', '0', 'project_user_status', '', '', 'Y', '0', 'admin', '2021-11-24 23:26:40', '', NULL, '小黑屋'),
+    (2, '正常', '1', 'project_user_status', '', '', 'Y', '0', 'admin', '2021-11-24 23:26:40', '', NULL, '正常'),
+    (3, '拉黑', '2', 'project_user_status', '', '', 'Y', '0', 'admin', '2021-11-24 23:26:40', '', NULL, '拉黑');

+ 8 - 6
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -1619,11 +1619,13 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     <select id="selectFsUserVOListByProject" resultType="com.fs.his.vo.FsUserVO">
         SELECT distinct
         b.total_amount,b.last_buy_time,p.pay_money as number,p.payment_id,p.pay_time,
-        u.*,
+        u.user_id, u.nick_name, u.avatar, u.phone, u.integral, u.now_money,
         fcc.watch_course_count, fcc.part_course_count, company_user.nick_name AS companyUserNickName, fcc.last_watch_date
         ,company.company_name,
         ucu.project_id,
-        ucu.id as companyUserId
+        ucu.id as companyUserId,
+        ucu.create_time as bindTime,
+        ucu.status
         FROM
         fs_user u
         LEFT JOIN (
@@ -1648,7 +1650,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
         fs_user_course_count
         GROUP BY fs_user_course_count.user_id
         ) fcc ON fcc.user_id = u.user_id
-        left join fs_user_company_user ucu on ucu.user_id = u.user_id
+        inner join fs_user_company_user ucu on ucu.user_id = u.user_id
         LEFT JOIN company_user ON company_user.user_id = ucu.company_user_id
         LEFT JOIN company on company.company_id = company_user.company_id
         <where>
@@ -1663,15 +1665,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
                 AND u.phone LIKE CONCAT("%",#{maps.phone},"%")
             </if >
             <if test = "maps.startCreateTime != null and maps.endCreateTime != null" >
-                AND (DATE_FORMAT( u.create_time, "%Y-%m-%d" ) &gt;= DATE_FORMAT(#{maps.startCreateTime}, "%Y-%m-%d")
-                and DATE_FORMAT( u.create_time, "%Y-%m-%d" ) &lt;= DATE_FORMAT(#{maps.endCreateTime}, "%Y-%m-%d")
+                AND (DATE_FORMAT( ucu.create_time, "%Y-%m-%d" ) &gt;= DATE_FORMAT(#{maps.startCreateTime}, "%Y-%m-%d")
+                and DATE_FORMAT( ucu.create_time, "%Y-%m-%d" ) &lt;= DATE_FORMAT(#{maps.endCreateTime}, "%Y-%m-%d")
                 )
             </if >
             <if test = "maps.registerCode != null  and  maps.registerCode !=''  " >
                 AND u.register_code = #{maps.registerCode}
             </if >
             <if test = "maps.status != null" >
-                AND u.STATUS = #{maps.status}
+                AND ucu.status = #{maps.status}
             </if >
             <if test = "maps.companyId != null and maps.companyId != '' " >
                 AND company.company_id = #{maps.companyId}