Browse Source

营期统计分页问题处理
用户迁移丢失问题处理
用户地址迁移丢失问题
小程序订单制单进入了不付款配置问题处理

yfh 2 weeks ago
parent
commit
1be965caff

+ 2 - 1
fs-company/src/main/java/com/fs/company/controller/course/FsUserCoursePeriodController.java

@@ -220,10 +220,11 @@ public class FsUserCoursePeriodController extends BaseController {
         FsUserCoursePeriod period = fsUserCoursePeriodService.selectFsUserCoursePeriodById(param.getPeriodId());
         param.setMaxDate(LocalDate.now().plusDays(period.getMaxViewNum()));
         List<FsPeriodCountVO> list = fsUserCoursePeriodDaysService.periodCourseCount(param);
+        long count = fsUserCoursePeriodDaysService.periodCourseByCount(param);
         PageInfo<FsPeriodCountVO> pageInfo = new PageInfo<>(list);
         Map<String, Object> result = new HashMap<>();
         result.put("rows", pageInfo.getList());
-        result.put("total", pageInfo.getTotal());
+        result.put("total", count);
         return R.ok(result);
     }
 

+ 10 - 2
fs-company/src/main/java/com/fs/company/controller/store/FsUserAddressController.java

@@ -1,9 +1,11 @@
 package com.fs.company.controller.store;
 
+import cn.hutool.core.util.ObjectUtil;
 import com.alibaba.fastjson.JSON;
 import com.fs.common.annotation.Log;
 import com.fs.common.core.controller.BaseController;
 import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.domain.R;
 import com.fs.common.core.domain.model.LoginUser;
 import com.fs.common.core.page.TableDataInfo;
 import com.fs.common.enums.BusinessType;
@@ -73,7 +75,13 @@ public class FsUserAddressController extends BaseController
         ExcelUtil<FsUserAddress> util = new ExcelUtil<FsUserAddress>(FsUserAddress.class);
         return util.exportExcel(list, "用户地址数据");
     }
-
+    @GetMapping("/getAddressList")
+    public R getAddressList(FsUserAddress fsUserAddress)
+    {
+        fsUserAddress.setIsDel(0);
+        List<FsUserAddress> list = fsUserAddressService.selectFsUserAddressList(fsUserAddress);
+        return R.ok().put("data", list);
+    }
     /**
      * 获取用户地址详细信息
      */
@@ -100,7 +108,7 @@ public class FsUserAddressController extends BaseController
     @PostMapping
     public AjaxResult add(@RequestBody FsUserAddress fsUserAddress)
     {
-        if(fsUserAddress.getIsDefault()==1){
+        if(ObjectUtil.isNotEmpty(fsUserAddress.getIsDefault())&&fsUserAddress.getIsDefault()==1){
             //处理默认地址
             fsUserAddressService.clearIsDefalut(fsUserAddress.getUserId());
         }

+ 7 - 0
fs-company/src/main/java/com/fs/company/controller/store/FsUserController.java

@@ -77,6 +77,13 @@ public class FsUserController extends BaseController
         }
         return getDataTable(list);
     }
+    @GetMapping("/getUserList")
+    public R getUserList( FsUser fsUser)
+    {
+        fsUser.setIsDel(0);
+        List<FsUser> list=fsUserService.selectFsUserList(fsUser);
+        return R.ok().put("data", list);
+    }
 
     @PreAuthorize("@ss.hasPermi('his:user:list')")
     @GetMapping("/userList")

+ 25 - 0
fs-service/src/main/java/com/fs/his/mapper/FsUserMapper.java

@@ -12,6 +12,7 @@ import com.fs.his.param.FsUserParam;
 import com.fs.his.vo.FsUserVO;
 import com.fs.his.vo.FsUserExportListVO;
 import com.fs.his.vo.OptionsVO;
+import com.fs.hisStore.vo.FsCompanyUserListQueryVO;
 import com.fs.qw.dto.FsUserTransferParamDTO;
 import com.fs.qw.param.QwFsUserParam;
 import com.fs.qw.vo.QwFsUserVO;
@@ -375,4 +376,28 @@ public interface FsUserMapper
 
     @Update("update fs_user set status = 0 where user_id = #{userId}")
     int updateUserStatus(@Param("userId")Long userId);
+
+    @Select({"<script> " +
+            "select distinct u.*,cu.nick_name as company_user_nick_name  from fs_user u left join fs_user_company_user ucu on ucu.user_id = u.user_id left join company_user cu on ucu.company_user_id=cu.user_id " +
+            "where u.is_del=0 " +
+            "<if test = 'maps.nickname != null and  maps.nickname !=\"\"    '> " +
+            "and u.nickname like CONCAT('%',#{maps.nickname},'%') " +
+            "</if>" +
+            "<if test = 'maps.phone != null   and  maps.phone !=\"\"   '> " +
+            "and u.phone=#{maps.phone} " +
+            "</if>" +
+            "<if test = 'maps.companyId != null    '> " +
+            "and cu.company_id=#{maps.companyId} " +
+            "</if>" +
+            "<if test = 'maps.status != null   and  maps.status !=\"\"   '> " +
+            "and u.status=#{maps.status} " +
+            "</if>" +
+            "<if test = 'maps.companyUserId != null    '> " +
+            "and cu.company_user_id=#{maps.companyUserId} " +
+            "</if>" +
+            " order by u.create_time desc "+
+            "</script>"})
+    List<FsCompanyUserListQueryVO> selectFsCompanyUserListQuery(@Param("maps")FsUser fsUser);
+
+    List<FsUser> selectFsUserListLimit(FsUser fsUser);
 }

+ 1 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserAddressService.java

@@ -70,4 +70,5 @@ public interface IFsUserAddressService
     Boolean isEntityNull(FsUserAddress fsUserAddress);
 
     Long selectFsUserAddressListCount(FsUserAddress fsUserAddress);
+
 }

+ 5 - 0
fs-service/src/main/java/com/fs/his/service/IFsUserService.java

@@ -18,6 +18,7 @@ import com.fs.his.vo.FsUserExportListVO;
 import com.fs.his.vo.FsUserFollowDoctorVO;
 import com.fs.his.vo.UserVo;
 import com.fs.hisStore.domain.FsStoreOrderScrm;
+import com.fs.hisStore.vo.FsCompanyUserListQueryVO;
 import com.fs.qw.dto.FsUserTransferParamDTO;
 import com.fs.qw.param.QwFsUserParam;
 import com.fs.qw.vo.QwFsUserVO;
@@ -201,4 +202,8 @@ public interface IFsUserService
      * 逻辑删除用户(修改状态为禁用)
      */
     R updateStatus(Long userId);
+
+    List<FsCompanyUserListQueryVO> selectFsCompanyUserListQuery(FsUser fsUser);
+
+    List<FsUser> getUserListLimit(FsUser fsUser);
 }

+ 2 - 2
fs-service/src/main/java/com/fs/his/service/impl/FsUserAddressServiceImpl.java

@@ -68,8 +68,9 @@ public class FsUserAddressServiceImpl implements IFsUserAddressService
     @Override
     public int insertFsUserAddress(FsUserAddress fsUserAddress)
     {
+        fsUserAddress.setDetail(fsUserAddress.getDetail().trim());
         fsUserAddress.setCreateTime(DateUtils.getNowDate());
-        fsUserAddress.setPhone(encryptPhone(fsUserAddress.getPhone()));
+//        fsUserAddress.setPhone(encryptPhone(fsUserAddress.getPhone()));
         return fsUserAddressMapper.insertFsUserAddress(fsUserAddress);
     }
 
@@ -177,7 +178,6 @@ public class FsUserAddressServiceImpl implements IFsUserAddressService
     public Long selectFsUserAddressListCount(FsUserAddress fsUserAddress) {
         return fsUserAddressMapper.selectFsUserAddressListCount(fsUserAddress);
     }
-
     private String encrypt(String content, String keyValue, String charset) {
         if (keyValue != null) {
             content = content + keyValue;

+ 9 - 5
fs-service/src/main/java/com/fs/his/service/impl/FsUserServiceImpl.java

@@ -3,7 +3,6 @@ package com.fs.his.service.impl;
 import java.lang.reflect.Field;
 import java.math.BigDecimal;
 import java.math.BigInteger;
-import java.math.MathContext;
 import java.math.RoundingMode;
 import java.time.LocalDateTime;
 import java.util.*;
@@ -12,8 +11,6 @@ import java.util.stream.Collectors;
 
 import cn.hutool.json.JSONUtil;
 import com.baomidou.mybatisplus.core.conditions.Wrapper;
-import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
-import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
 import com.baomidou.mybatisplus.core.toolkit.ObjectUtils;
 import com.baomidou.mybatisplus.core.toolkit.Wrappers;
 import com.fs.common.constant.HttpStatus;
@@ -31,7 +28,6 @@ import com.fs.company.domain.*;
 import com.fs.company.mapper.*;
 import com.fs.company.service.ICompanyTagService;
 import com.fs.course.domain.FsUserCompanyUser;
-import com.fs.course.mapper.FsUserCompanyUserMapper;
 import com.fs.course.mapper.FsUserCourseVideoMapper;
 import com.fs.course.param.CourseAnalysisParam;
 import com.fs.course.param.newfs.FsUserCourseBeMemberParam;
@@ -43,7 +39,6 @@ import com.fs.course.vo.newfs.FsUserCourseVideoPageListVO;
 import com.fs.his.config.IntegralConfig;
 import com.fs.his.domain.*;
 import com.fs.his.domain.FsUserAddress;
-import com.fs.his.domain.FsUserBill;
 import com.fs.his.domain.FsUserIntegralLogs;
 import com.fs.his.enums.FsUserIntegralLogTypeEnum;
 import com.fs.his.mapper.*;
@@ -60,6 +55,7 @@ import com.fs.hisStore.domain.FsUserBillScrm;
 import com.fs.hisStore.enums.BillDetailEnum;
 import com.fs.hisStore.mapper.FsStoreOrderScrmMapper;
 import com.fs.hisStore.service.IFsUserBillScrmService;
+import com.fs.hisStore.vo.FsCompanyUserListQueryVO;
 import com.fs.qw.cache.IQwExternalContactCacheService;
 import com.fs.qw.dto.FsUserTransferParamDTO;
 import com.fs.qw.param.QwFsUserParam;
@@ -1223,5 +1219,13 @@ public class FsUserServiceImpl implements IFsUserService
         fsUserCompanyUser.setCompanyUserId(param.getCompanyUserId());
         return fsUserCompanyUser;
     }
+    @Override
+    public List<FsCompanyUserListQueryVO> selectFsCompanyUserListQuery(FsUser fsUser) {
+        return fsUserMapper.selectFsCompanyUserListQuery(fsUser);
+    }
+    @Override
+    public List<FsUser> getUserListLimit(FsUser fsUser) {
+        return fsUserMapper.selectFsUserListLimit(fsUser);
+    }
 
 }

+ 2 - 0
fs-service/src/main/java/com/fs/hisStore/param/FsStoreOrderCreateParam.java

@@ -54,4 +54,6 @@ public class FsStoreOrderCreateParam implements Serializable
 
     private Integer orderType; //订单类型
     private Integer orderMedium; //媒体来源
+
+    private Boolean isUserApp = true;
 }

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/service/impl/FsStoreOrderScrmServiceImpl.java

@@ -710,7 +710,7 @@ public class FsStoreOrderScrmServiceImpl implements IFsStoreOrderScrmService
                 //后台制单 判断是否需要付款
                 Company company = companyMapper.selectCompanyById(param.getCompanyId());
                 if(company!=null){
-                    if (company.getIsPay() != null && company.getIsPay() == 0) {
+                    if (company.getIsPay() != null && company.getIsPay() == 0 && param.getIsUserApp()) {
                         //不需要付款
                         storeOrder.setStatus(1); //待发货
                         isPay = false;

+ 47 - 1
fs-service/src/main/resources/mapper/his/FsUserMapper.xml

@@ -1841,5 +1841,51 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             and company_user_id = #{companyUserId}
         </if>
     </select>
-
+    <select id="selectFsUserListLimit"  resultMap="FsUserResult">
+        <include refid="selectFsUserVo"/>
+        <where>
+            <if test="password != null  and password != ''">and password = #{password}</if>
+            <if test="realName != null  and realName != ''">and real_name like concat('%', #{realName}, '%')</if>
+            <if test="birthday != null ">and birthday = #{birthday}</if>
+            <if test="idCard != null  and idCard != ''">and id_card = #{idCard}</if>
+            <if test="remark != null  and remark != ''">and remark = #{remark}</if>
+            <if test="avatar != null  and avatar != ''">and avatar = #{avatar}</if>
+            <if test="lastIp != null  and lastIp != ''">and last_ip = #{lastIp}</if>
+            <if test="nowMoney != null ">and now_money = #{nowMoney}</if>
+            <if test="brokeragePrice != null ">and brokerage_price = #{brokeragePrice}</if>
+            <if test="integral != null ">and integral = #{integral}</if>
+            <if test="signNum != null ">and sign_num = #{signNum}</if>
+            <if test="status != null ">and status = #{status}</if>
+            <if test="level != null ">and level = #{level}</if>
+            <if test="spreadUserId != null ">and spread_user_id = #{spreadUserId}</if>
+            <if test="spreadTime != null ">and spread_time = #{spreadTime}</if>
+            <if test="userType != null  and userType != ''">and user_type = #{userType}</if>
+            <if test="isPromoter != null ">and is_promoter = #{isPromoter}</if>
+            <if test="payCount != null ">and pay_count = #{payCount}</if>
+            <if test="spreadCount != null ">and spread_count = #{spreadCount}</if>
+            <if test="addres != null  and addres != ''">and addres = #{addres}</if>
+            <if test="isDel != null ">and is_del = #{isDel}</if>
+            <if test="companyId != null ">and company_id = #{companyId}</if>
+            <if test="companyUserId != null ">and company_user_id = #{companyUserId}</if>
+            <if test="registerDate != null ">and DATE_FORMAT(register_date,'%Y-%m-%d') =
+                DATE_FORMAT(#{registerDate},'%Y-%m-%d')
+            </if>
+            <if test="registerCode != null   and registerCode != '' ">and register_code = #{registerCode}</if>
+            <if test="source != null  and source != '' ">and source = #{source}</if>
+            <if test="isShow != null  ">and is_show = #{isShow}</if>
+            <if test="(username != null  and username != '') or (userId != null  and userId != '') or (nickname != null  and nickname != '') or (phone != null  and phone != '')">
+                and (
+                <if test="username != null  and username != ''">username like concat('%', #{username}, '%')</if>
+                <if test="userId != null  and userId != ''">or user_id = #{userId}</if>
+                <if test="nickname != null  and nickname != ''">or nickname like concat('%', #{nickname}, '%')</if>
+                <if test="phone != null  and phone != ''">or phone like concat('%',#{phone},'%')</if>
+                )
+            </if>
+            <if test="qwRepeat != null  ">and qw_repeat = #{qwRepeat}</if>
+            <if test="userRepeat != null  ">and user_repeat = #{userRepeat}</if>
+            <if test="payOrder != null  ">and pay_order = #{payOrder}</if>
+        </where>
+        order by user_id desc
+        limit 10
+    </select>
 </mapper>

+ 1 - 0
fs-user-app/src/main/java/com/fs/app/controller/store/StoreOrderScrmController.java

@@ -271,6 +271,7 @@ public class StoreOrderScrmController extends AppBaseController {
     @PostMapping("/create")
     public R create(@Validated @RequestBody FsStoreOrderCreateParam param, HttpServletRequest request){
         String userId=getUserId();
+        param.setIsUserApp(false);
         return orderService.createOrder(Long.parseLong(getUserId()),param);
     }