Преглед изворни кода

添加 骄阳 达人列表 添加修改接口

zhaoxian пре 2 година
родитељ
комит
afacc5ec9f

+ 10 - 2
ruixuan-live/src/main/java/com/ruixuan/isc/controller/KuaishouPromoterController.java

@@ -6,7 +6,6 @@ import com.ruixuan.common.core.domain.AjaxResult;
 import com.ruixuan.common.core.page.TableDataInfo;
 import com.ruixuan.common.utils.Check;
 import com.ruixuan.common.utils.Result;
-import com.ruixuan.common.utils.spring.SpringUtils;
 import com.ruixuan.isc.entity.JYKuaishouPromoter;
 import com.ruixuan.isc.entity.KuaishouPromoter;
 import com.ruixuan.isc.service.IKuaishouPromoterService;
@@ -138,7 +137,7 @@ public class KuaishouPromoterController extends BaseController {
         if (Check.isNotNull(promoterId)) {
             promoterId = promoterId.trim();
         }
-        List<JYKuaishouPromoter> list = kuaishouPromoterService.selectKuaishouPromoterList3(userId, promoterId, promoterNickName, mediaId,type, parameter, orderBy);
+        List<JYKuaishouPromoter> list = kuaishouPromoterService.selectKuaishouPromoterList3(userId, promoterId, promoterNickName, mediaId, type, parameter, orderBy);
         return getDataTable(list);
     }
 
@@ -274,6 +273,15 @@ public class KuaishouPromoterController extends BaseController {
     }
 
     /**
+     * 修改骄阳达人 信息
+     */
+    @PostMapping(value = "/edit3")
+    @ApiOperation(value = "修改快手达人")
+    public AjaxResult edit3(@RequestBody JYKuaishouPromoter kuaishouPromoter) {
+        return toAjax(kuaishouPromoterService.updateKuaishouPromoter3(kuaishouPromoter));
+    }
+
+    /**
      * 修改快手达人标签信息
      */
     @PostMapping(value = "/updatePromoterLabel")

+ 9 - 7
ruixuan-live/src/main/java/com/ruixuan/isc/mapper/KuaishouPromoterMapper.java

@@ -27,11 +27,11 @@ public interface KuaishouPromoterMapper {
                                                              @Param("mediaId") String mediaId,
                                                              @Param("parameter") String parameter, @Param("orderBy") String orderBy);
 
- public List<JYKuaishouPromoter> selectKuaishouPromoterList3(@Param("userList") List<Long> userList, @Param("promoterId") String promoterId,
-                                                             @Param("promoterNickName") String promoterNickName,
-                                                             @Param("mediaId") String mediaId,
-                                                             @Param("type") String type,
-                                                             @Param("parameter") String parameter, @Param("orderBy") String orderBy);
+    public List<JYKuaishouPromoter> selectKuaishouPromoterList3(@Param("userList") List<Long> userList, @Param("promoterId") String promoterId,
+                                                                @Param("promoterNickName") String promoterNickName,
+                                                                @Param("mediaId") String mediaId,
+                                                                @Param("type") String type,
+                                                                @Param("parameter") String parameter, @Param("orderBy") String orderBy);
 
     /**
      * 新增快手达人 信息
@@ -114,7 +114,9 @@ public interface KuaishouPromoterMapper {
 
     KuaishouPromoter getOneByIdAndPromoterId3(@Param("userId") Long userId, @Param("promoterId") String promoterId);
 
-   void insertKuaishouPromoter3(JYKuaishouPromoter promoter);
+    void insertKuaishouPromoter3(JYKuaishouPromoter promoter);
+
+    void updateKuaishouPromoterByPromoterId3(JYKuaishouPromoter kuaishouPromoter);
 
-   void updateKuaishouPromoterByPromoterId3(JYKuaishouPromoter kuaishouPromoter);
+    int updateKuaishouPromoter3(JYKuaishouPromoter kuaishouPromoter);
 }

+ 3 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/IKuaishouPromoterService.java

@@ -31,7 +31,7 @@ public interface IKuaishouPromoterService {
      */
     public List<KuaishouPromoter> selectKuaishouPromoterList(Long userId, String promoterId, String promoterNickName, String mediaId, String parameter, String orderBy);
 
-    public List<JYKuaishouPromoter> selectKuaishouPromoterList3(Long userId, String promoterId, String promoterNickName, String mediaId,String type, String parameter, String orderBy);
+    public List<JYKuaishouPromoter> selectKuaishouPromoterList3(Long userId, String promoterId, String promoterNickName, String mediaId, String type, String parameter, String orderBy);
 
     /**
      * 新增快手达人 信息
@@ -88,4 +88,6 @@ public interface IKuaishouPromoterService {
     List<String> selectPromoterIdListByTime(List<Long> userList, Long startDate, Long endDate);
 
     JSONObject insertKuaishouPromoter3(JYKuaishouPromoter kuaishouPromoter);
+
+    int updateKuaishouPromoter3(JYKuaishouPromoter kuaishouPromoter);
 }

+ 12 - 1
ruixuan-live/src/main/java/com/ruixuan/isc/service/impl/KuaishouPromoterServiceImpl.java

@@ -157,7 +157,7 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
             orderBy = "desc";
         }
         PageUtils.startPage();
-        List<JYKuaishouPromoter> list = kuaishouPromoterMapper.selectKuaishouPromoterList3(userList, promoterId, promoterNickName, mediaId,type, parameter, orderBy);
+        List<JYKuaishouPromoter> list = kuaishouPromoterMapper.selectKuaishouPromoterList3(userList, promoterId, promoterNickName, mediaId, type, parameter, orderBy);
         list.forEach(ent -> {
             JSONObject follow = kuaishouPromoterMapper.getFollowUpRecordsByUserId(ent.getPromoterId(), ent.getUserId());
             ent.setFollowUpRecord(Check.isNull(follow) ? "-" : follow.getString("txt"));
@@ -542,6 +542,17 @@ public class KuaishouPromoterServiceImpl implements IKuaishouPromoterService {
     }
 
     /**
+     * 修改快手达人 信息
+     *
+     * @param kuaishouPromoter 快手达人 信息
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouPromoter3(JYKuaishouPromoter kuaishouPromoter) {
+        return kuaishouPromoterMapper.updateKuaishouPromoter3(kuaishouPromoter);
+    }
+
+    /**
      * 删除快手达人 信息信息
      *
      * @param id 快手达人 信息主键 follow_up_records

+ 43 - 3
ruixuan-live/src/main/resources/mapper/isc/KuaishouPromoterMapper.xml

@@ -527,6 +527,33 @@
         where id = #{id}
     </update>
 
+    <update id="updateKuaishouPromoter3" parameterType="com.ruixuan.isc.entity.JYKuaishouPromoter">
+        update jy_kuaishou_promoter
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="mediaId != null">media_id = #{mediaId},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="promoterId != null">promoter_id = #{promoterId},</if>
+            <if test="promoterNickName != null">promoter_nick_name = #{promoterNickName},</if>
+            <if test="totalSale != null">total_sale = #{totalSale},</if>
+            <if test="fansNumber != null">fans_number = #{fansNumber},</if>
+            <if test="promoterUrl != null">promoter_url = #{promoterUrl},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="consignee != null">consignee = #{consignee},</if>
+            <if test="promoterAddress != null">promoter_address = #{promoterAddress},</if>
+            <if test="state != null">state = #{state},</if>
+            <if test="province != null">province = #{province},</if>
+            <if test="commissionRequirement != null">commission_requirement = #{commissionRequirement},</if>
+            <if test="categoryRequirement != null">category_requirement = #{categoryRequirement},</if>
+            <if test="avgVideoSales != null">avg_video_sales = #{avgVideoSales},</if>
+            <if test="videoSales != null">video_sales = #{videoSales},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
     <update id="updateKuaishouPromoterByPromoterId" parameterType="com.ruixuan.isc.entity.KuaishouPromoter">
         update kuaishou_promoter
         <trim prefix="SET" suffixOverrides=",">
@@ -707,7 +734,9 @@
         WHERE user_id = #{userId}
     </select>
     <select id="getRuleName" resultType="java.lang.String" parameterType="java.lang.Long">
-        select rule_name  from  kuaishou_settlement_rules where id = #{ruleId}
+        select rule_name
+        from kuaishou_settlement_rules
+        where id = #{ruleId}
     </select>
 
 
@@ -723,10 +752,21 @@
         )
     </insert>
     <insert id="addRule">
-        replace into
+        replace
+        into
          promoter_bind_rule(promoter_id,rule_id,rule_name,create_time,update_time)
           values
-        (#{promoterId},#{ruleId},#{ruleName},now(),now())
+        (
+        #{promoterId},
+        #{ruleId},
+        #{ruleName},
+        now
+        (
+        ),
+        now
+        (
+        )
+        )
 
     </insert>
 </mapper>