Althars123 2 年之前
父節點
當前提交
45cee8b892

+ 2 - 2
sdjk-admin/src/main/java/com/miaxis/app/controller/wx/WxNotifyController.java

@@ -296,8 +296,8 @@ public class WxNotifyController {
                 wxOrder.setCommissionPrice(zhuboFencheng);
                 zhubo.setProfitPrice(zhubo.getProfitPrice()+zhuboFencheng);
                 hehuoren.setProfitPrice(hehuoren.getProfitPrice()+hehuorenFencheng);
-                userInfoService.updateById(zhubo);
-                userInfoService.updateById(hehuoren);
+                userInfoService.addProfitPrice(zhubo.getId(),zhuboFencheng);
+                userInfoService.addProfitPrice(hehuoren.getId(),hehuorenFencheng);
 
 
             }

+ 2 - 0
sdjk-service/src/main/java/com/miaxis/user/mapper/UserInfoMapper.java

@@ -3,6 +3,7 @@ package com.miaxis.user.mapper;
 import java.util.List;
 import com.baomidou.mybatisplus.core.mapper.BaseMapper;
 import com.miaxis.common.core.domain.entity.UserInfo;
+import org.apache.ibatis.annotations.Param;
 
 /**
  * 用户Mapper接口
@@ -19,4 +20,5 @@ public interface UserInfoMapper extends BaseMapper<UserInfo> {
      */
     public List<UserInfo> selectUserInfoList(UserInfo userInfo);
 
+    void addProfitPrice(@Param("id") Long id, @Param("fencheng")Integer fencheng);
 }

+ 2 - 0
sdjk-service/src/main/java/com/miaxis/user/service/IUserInfoService.java

@@ -19,4 +19,6 @@ public interface IUserInfoService extends IService<UserInfo>{
      * @return 用户集合
      */
     public List<UserInfo> selectUserInfoList(UserInfo userInfo);
+
+    void addProfitPrice(Long id, Integer zhuboFencheng);
 }

+ 5 - 0
sdjk-service/src/main/java/com/miaxis/user/service/impl/UserInfoServiceImpl.java

@@ -34,4 +34,9 @@ public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo> i
     public List<UserInfo> selectUserInfoList(UserInfo userInfo){
         return userInfoMapper.selectUserInfoList(userInfo);
     }
+
+    @Override
+    public void addProfitPrice(Long id, Integer fencheng) {
+        userInfoMapper.addProfitPrice(id,fencheng);
+    }
 }

+ 9 - 0
sdjk-service/src/main/resources/mapper/user/UserInfoMapper.xml

@@ -33,5 +33,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
             <if test="unionId != null  and unionId != ''"> and union_id = #{unionId}</if>
         </where>
     </select>
+    <update id="addProfitPrice">
+        update user_info set profit_price =profit_price + #{fencheng}
+        where id = #{id}
+
+
+
+    </update>
+
+
 
 </mapper>