Browse Source

推广员bug修复,调试

xgb 1 tuần trước cách đây
mục cha
commit
01dc043644

+ 9 - 9
fs-service/src/main/java/com/fs/hisStore/mapper/FsUserBillScrmMapper.java

@@ -11,15 +11,15 @@ import org.apache.ibatis.annotations.Select;
 
 /**
  * 用户账单Mapper接口
- * 
+ *
  * @author fs
  * @date 2022-04-03
  */
-public interface FsUserBillScrmMapper 
+public interface FsUserBillScrmMapper
 {
     /**
      * 查询用户账单
-     * 
+     *
      * @param id 用户账单ID
      * @return 用户账单
      */
@@ -27,7 +27,7 @@ public interface FsUserBillScrmMapper
 
     /**
      * 查询用户账单列表
-     * 
+     *
      * @param fsUserBill 用户账单
      * @return 用户账单集合
      */
@@ -35,7 +35,7 @@ public interface FsUserBillScrmMapper
 
     /**
      * 新增用户账单
-     * 
+     *
      * @param fsUserBill 用户账单
      * @return 结果
      */
@@ -43,7 +43,7 @@ public interface FsUserBillScrmMapper
 
     /**
      * 修改用户账单
-     * 
+     *
      * @param fsUserBill 用户账单
      * @return 结果
      */
@@ -51,7 +51,7 @@ public interface FsUserBillScrmMapper
 
     /**
      * 删除用户账单
-     * 
+     *
      * @param id 用户账单ID
      * @return 结果
      */
@@ -59,7 +59,7 @@ public interface FsUserBillScrmMapper
 
     /**
      * 批量删除用户账单
-     * 
+     *
      * @param ids 需要删除的数据ID
      * @return 结果
      */
@@ -99,7 +99,7 @@ public interface FsUserBillScrmMapper
             "</script>"})
     List<FsUserBillVO> selectFsUserBillListVO(@Param("maps")FsUserBillParam fsUserBill);
     @Select({"<script> " +
-            "select ifnull(sum(number),0) from fs_user_bill " +
+            "select ifnull(sum(money),0) from fs_user_bill " +
             "where user_id=#{userId} " +
             "<if test = 'cate != null  and cate != \"\"  '> " +
             "and category=#{cate} " +

+ 1 - 1
fs-service/src/main/java/com/fs/hisStore/mapper/FsUserScrmMapper.java

@@ -158,7 +158,7 @@ public interface FsUserScrmMapper
             "</script>"})
     List<FsCompanyUserListQueryVO> selectFsCompanyUserListQuery(@Param("maps") FsUserScrm fsUser);
     @Select({"<script> " +
-            "select u.user_id,u.phone,u.avatar,u.nickname,ifnull((select sum(b.number) from fs_user_bill b where b.category='brokerage_price' and b.bill_type=1  and b.tui_user_id=u.user_id and b.user_id=#{userId} ),0)-ifnull((select sum(b.number) from fs_user_bill b where b.category='brokerage_price' and b.bill_type=0 and b.tui_user_id=u.user_id and b.user_id=#{userId}  ),0) as tui_money ,u.create_time from fs_user u " +
+            "select u.user_id,u.phone,u.avatar,u.nickname,ifnull((select sum(b.money) from fs_user_bill b where b.category='brokerage_price' and b.bill_type=1  and b.tui_user_id=u.user_id and b.user_id=#{userId} ),0)-ifnull((select sum(b.money) from fs_user_bill b where b.category='brokerage_price' and b.bill_type=0 and b.tui_user_id=u.user_id and b.user_id=#{userId}  ),0) as tui_money ,u.create_time from fs_user u " +
             "where u.spread_user_id=#{userId} " +
             "order by tui_money desc " +
             "</script>"})

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

@@ -52,7 +52,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectFsUserVo">
-        select user_id,qw_ext_id,sex,is_buy,`level`,course_ma_open_id,is_push,is_add_qw,source,login_device,is_individuation_push,store_open_id,password,jpush_id, is_vip,vip_start_date,vip_end_date,vip_level,vip_status,nick_name,integral_status, avatar, phone, integral,sign_num, status, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, create_time, update_time, last_ip, balance,is_weixin_auth,parent_id,qw_user_id,company_id,company_user_id,is_promoter from fs_user
+        select user_id,qw_ext_id,sex,is_buy,`level`,course_ma_open_id,is_push,is_add_qw,source,login_device,is_individuation_push,store_open_id,password,jpush_id, is_vip,vip_start_date,vip_end_date,vip_level,vip_status,nick_name,integral_status, avatar, phone, integral,sign_num, status, tui_user_id, tui_time, tui_user_count, ma_open_id, mp_open_id, union_id, is_del, user_code, remark, create_time, update_time, last_ip, balance,is_weixin_auth,parent_id,qw_user_id,company_id,company_user_id,is_promoter,now_money,brokerage_price from fs_user
     </sql>
 
     <select id="selectFsUserList" parameterType="FsUser" resultMap="FsUserResult">

+ 5 - 4
fs-user-app/src/main/java/com/fs/app/controller/store/UserScrmController.java

@@ -218,16 +218,17 @@ public class UserScrmController extends AppBaseController {
         return R.ok().put("data",listPageInfo);
     }
 
-    @Login
+//    @Login
     @ApiOperation("获取用户金额")
     @GetMapping("/getTuiMoney")
     public R getMemberTuiMoney(HttpServletRequest request){
         try {
-            FsUserScrm user=userService.selectFsUserById(Long.parseLong(getUserId()));
-            BigDecimal yesterdayMoney=userBillService.selectFsUserBillTotalByUserId(getUserId(),"brokerage_price");
+            String userId=getUserId();
+            FsUserScrm user=userService.selectFsUserById(Long.parseLong(userId));
+            BigDecimal yesterdayMoney=userBillService.selectFsUserBillTotalByUserId(userId,"brokerage_price");
             return R.ok().put("nowMoney",user.getNowMoney()).put("brokeragePrice",user.getBrokeragePrice()).put("yesterdayMoney",yesterdayMoney);
         } catch (Exception e){
-
+            log.error("获取用户金额异常",e);
             return R.error("操作异常");
         }
     }

BIN
fs-user-app/src/main/resources/fx.jpg


BIN
fs-user-app/src/main/resources/qr.jpg


BIN
fs-user-app/src/main/resources/simsunb.ttf