Jelajahi Sumber

磁力金牛 初版

zhaoxian 2 tahun lalu
induk
melakukan
2ad5856841

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

@@ -643,6 +643,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                     obj.put("regimentalPromotionAmount", 0);
                     obj.put("promoterCount", 0);
                     obj.put("orderCount", 0);
+                    obj.put("validOrderCount", 0);
                     list.add(obj);
                 }
             }
@@ -701,6 +702,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                         obj.put("orderAmount", 0);
                         obj.put("regimentalPromotionAmount", 0);
                         obj.put("orderCount", 0);
+                        obj.put("validOrderCount", 0);
                         list.add(obj);
                     }
                 }
@@ -718,7 +720,7 @@ public class KuaishouItemCollectSamplesServiceImpl implements IKuaishouItemColle
                 data.put("orderAmount", amount.getInteger("orderAmount"));
                 data.put("regimentalPromotionAmount", amount.getInteger("regimentalPromotionAmount"));
                 data.put("orderAmountRate", amount.getString("orderAmountRate"));
-                data.put("totalRegimentalSettleAmountRate", amount.getString("totalRegimentalSettleAmountRate"));
+                data.put("regimentalPromotionAmountRate", amount.getString("regimentalPromotionAmountRate"));
                 data.put("orderCount", amount.getString("orderCount"));
                 data.put("orderCountRate", amount.getString("orderCountRate"));
             }

+ 79 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/controller/KuaishouAccountController.java

@@ -0,0 +1,79 @@
+package com.ruixuan.jinniu.controller;
+
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.jinniu.entity.KuaishouAccount;
+import com.ruixuan.jinniu.service.IKuaishouAccountService;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.PutMapping;
+import org.springframework.web.bind.annotation.DeleteMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+/**
+ * 账户Controller
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+@RestController
+@RequestMapping("/system/account")
+public class KuaishouAccountController extends BaseController {
+    @Autowired
+    private IKuaishouAccountService kuaishouAccountService;
+
+    /**
+     * 查询账户列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:account:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouAccount kuaishouAccount) {
+        startPage();
+        List<KuaishouAccount> list = kuaishouAccountService.selectKuaishouAccountList(kuaishouAccount);
+        return getDataTable(list);
+    }
+
+
+    /**
+     * 获取账户详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:account:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(kuaishouAccountService.selectKuaishouAccountById(id));
+    }
+
+    /**
+     * 新增账户
+     */
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouAccount kuaishouAccount) {
+        return toAjax(kuaishouAccountService.insertKuaishouAccount(kuaishouAccount));
+    }
+
+    /**
+     * 修改账户
+     */
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouAccount kuaishouAccount) {
+        return toAjax(kuaishouAccountService.updateKuaishouAccount(kuaishouAccount));
+    }
+
+    /**
+     * 删除账户
+     */
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+        return toAjax(kuaishouAccountService.deleteKuaishouAccountByIds(ids));
+    }
+}

+ 118 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/entity/KuaishouAccount.java

@@ -0,0 +1,118 @@
+package com.ruixuan.jinniu.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruixuan.common.core.domain.BaseEntity;
+import io.swagger.annotations.ApiModelProperty;
+
+import java.util.Date;
+
+/**
+ * 账户对象 kuaishou_account
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public class KuaishouAccount extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 账户ID
+     */
+    @ApiModelProperty(name = "账户ID")
+    private Long accountId;
+
+    /**
+     * 账户名称
+     */
+    @ApiModelProperty(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 项目ID
+     */
+    @ApiModelProperty(name = "项目ID")
+    private Long projectId;
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty(name = "项目名称")
+    private String projectName;
+
+    /**
+     * 媒体类型 磁力金牛、千川
+     */
+    @ApiModelProperty(name = "媒体类型 磁力金牛、千川")
+    private String mediaCode;
+
+    /**
+     * 快手ID
+     */
+    @ApiModelProperty(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 快手昵称
+     */
+    @ApiModelProperty(name = "快手昵称")
+    private String ksName;
+
+    /**
+     * 运营(优化)负责人Id
+     */
+    @ApiModelProperty(name = "运营(优化)负责人Id")
+    private String operatorId;
+
+    /**
+     * 运营(优化)负责人
+     */
+    @ApiModelProperty(name = "运营(优化)负责人")
+    private String operatorLeader;
+
+    /**
+     * 产品名称
+     */
+    @ApiModelProperty(name = "产品名称")
+    private String productName;
+
+    /**
+     * 一级行业
+     */
+    @ApiModelProperty(name = "一级行业")
+    private String industry;
+
+    /**
+     * 二级行业
+     */
+    @ApiModelProperty(name = "二级行业")
+    private String secondIndustry;
+
+    /**
+     * 公司名称
+     */
+    @ApiModelProperty(name = "公司名称")
+    private String corporationName;
+
+    /**
+     * 账户状态
+     */
+    @ApiModelProperty(name = "账户状态")
+    private String accountStatus;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 62 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/mapper/KuaishouAccountMapper.java

@@ -0,0 +1,62 @@
+package com.ruixuan.jinniu.mapper;
+
+
+import com.ruixuan.jinniu.entity.KuaishouAccount;
+
+import java.util.List;
+
+/**
+ * 账户Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface KuaishouAccountMapper {
+    /**
+     * 查询账户
+     *
+     * @param id 账户主键
+     * @return 账户
+     */
+    public KuaishouAccount selectKuaishouAccountById(Long id);
+
+    /**
+     * 查询账户列表
+     *
+     * @param kuaishouAccount 账户
+     * @return 账户集合
+     */
+    public List<KuaishouAccount> selectKuaishouAccountList(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 新增账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    public int insertKuaishouAccount(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 修改账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    public int updateKuaishouAccount(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 删除账户
+     *
+     * @param id 账户主键
+     * @return 结果
+     */
+    public int deleteKuaishouAccountById(Long id);
+
+    /**
+     * 批量删除账户
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouAccountByIds(Long[] ids);
+}

+ 62 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/IKuaishouAccountService.java

@@ -0,0 +1,62 @@
+package com.ruixuan.jinniu.service;
+
+
+import com.ruixuan.jinniu.entity.KuaishouAccount;
+
+import java.util.List;
+
+/**
+ * 账户Service接口
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface IKuaishouAccountService {
+    /**
+     * 查询账户
+     *
+     * @param id 账户主键
+     * @return 账户
+     */
+    public KuaishouAccount selectKuaishouAccountById(Long id);
+
+    /**
+     * 查询账户列表
+     *
+     * @param kuaishouAccount 账户
+     * @return 账户集合
+     */
+    public List<KuaishouAccount> selectKuaishouAccountList(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 新增账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    public int insertKuaishouAccount(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 修改账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    public int updateKuaishouAccount(KuaishouAccount kuaishouAccount);
+
+    /**
+     * 批量删除账户
+     *
+     * @param ids 需要删除的账户主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouAccountByIds(Long[] ids);
+
+    /**
+     * 删除账户信息
+     *
+     * @param id 账户主键
+     * @return 结果
+     */
+    public int deleteKuaishouAccountById(Long id);
+}

+ 87 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/impl/KuaishouAccountServiceImpl.java

@@ -0,0 +1,87 @@
+package com.ruixuan.jinniu.service.impl;
+
+import com.ruixuan.jinniu.entity.KuaishouAccount;
+import com.ruixuan.jinniu.mapper.KuaishouAccountMapper;
+import com.ruixuan.jinniu.service.IKuaishouAccountService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 账户Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+@Service
+public class KuaishouAccountServiceImpl implements IKuaishouAccountService {
+    @Autowired
+    private KuaishouAccountMapper kuaishouAccountMapper;
+
+    /**
+     * 查询账户
+     *
+     * @param id 账户主键
+     * @return 账户
+     */
+    @Override
+    public KuaishouAccount selectKuaishouAccountById(Long id) {
+        return kuaishouAccountMapper.selectKuaishouAccountById(id);
+    }
+
+    /**
+     * 查询账户列表
+     *
+     * @param kuaishouAccount 账户
+     * @return 账户
+     */
+    @Override
+    public List<KuaishouAccount> selectKuaishouAccountList(KuaishouAccount kuaishouAccount) {
+        return kuaishouAccountMapper.selectKuaishouAccountList(kuaishouAccount);
+    }
+
+    /**
+     * 新增账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouAccount(KuaishouAccount kuaishouAccount) {
+        return kuaishouAccountMapper.insertKuaishouAccount(kuaishouAccount);
+    }
+
+    /**
+     * 修改账户
+     *
+     * @param kuaishouAccount 账户
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouAccount(KuaishouAccount kuaishouAccount) {
+        return kuaishouAccountMapper.updateKuaishouAccount(kuaishouAccount);
+    }
+
+    /**
+     * 批量删除账户
+     *
+     * @param ids 需要删除的账户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouAccountByIds(Long[] ids) {
+        return kuaishouAccountMapper.deleteKuaishouAccountByIds(ids);
+    }
+
+    /**
+     * 删除账户信息
+     *
+     * @param id 账户主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouAccountById(Long id) {
+        return kuaishouAccountMapper.deleteKuaishouAccountById(id);
+    }
+}

ruixuan-live/src/main/resources/mapper/jinniu/RxProjectMapper.xml → ruixuan-live/src/main/resources/mapper/jinniu/KuaishouAccountMapper.xml


ruixuan-live/src/main/resources/mapper/jinniu/RxAdvertiserMapper.xml → ruixuan-live/src/main/resources/mapper/jinniu/KuaishouAdvertiserMapper.xml


+ 158 - 0
ruixuan-live/src/main/resources/mapper/jinniu/KuaishouProjectMapper.xml

@@ -0,0 +1,158 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper
+        PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
+        "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.ruixuan.jinniu.mapper.KuaishouAccountMapper">
+
+    <resultMap type="com.ruixuan.jinniu.entity.KuaishouAccount" id="KuaishouAccountResult">
+        <result property="id" column="id"/>
+        <result property="accountId" column="account_id"/>
+        <result property="accountName" column="account_name"/>
+        <result property="projectId" column="project_id"/>
+        <result property="projectName" column="project_name"/>
+        <result property="mediaCode" column="media_code"/>
+        <result property="ksId" column="ks_id"/>
+        <result property="ksName" column="ks_name"/>
+        <result property="operatorId" column="operator_id"/>
+        <result property="operatorLeader" column="operator_leader"/>
+        <result property="productName" column="product_name"/>
+        <result property="industry" column="industry"/>
+        <result property="secondIndustry" column="second_industry"/>
+        <result property="corporationName" column="corporation_name"/>
+        <result property="accountStatus" column="account_status"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouAccountVo">
+        select id,
+               account_id,
+               account_name,
+               project_id,
+               project_name,
+               media_code,
+               ks_id,
+               ks_name,
+               operator_id,
+               operator_leader,
+               product_name,
+               industry,
+               second_industry,
+               corporation_name,
+               account_status,
+               create_time,
+               update_time
+        from kuaishou_account
+    </sql>
+
+    <select id="selectKuaishouAccountList" parameterType="com.ruixuan.jinniu.entity.KuaishouAccount"
+            resultMap="KuaishouAccountResult">
+        <include refid="selectKuaishouAccountVo"/>
+        <where>
+            <if test="accountId != null ">and account_id = #{accountId}</if>
+            <if test="accountName != null  and accountName != ''">and account_name like concat('%', #{accountName},
+                '%')
+            </if>
+            <if test="projectId != null ">and project_id = #{projectId}</if>
+            <if test="projectName != null  and projectName != ''">and project_name like concat('%', #{projectName},
+                '%')
+            </if>
+            <if test="mediaCode != null  and mediaCode != ''">and media_code = #{mediaCode}</if>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="ksName != null  and ksName != ''">and ks_name like concat('%', #{ksName}, '%')</if>
+            <if test="operatorId != null  and operatorId != ''">and operator_id = #{operatorId}</if>
+            <if test="operatorLeader != null  and operatorLeader != ''">and operator_leader = #{operatorLeader}</if>
+            <if test="productName != null  and productName != ''">and product_name like concat('%', #{productName},
+                '%')
+            </if>
+            <if test="industry != null  and industry != ''">and industry = #{industry}</if>
+            <if test="secondIndustry != null  and secondIndustry != ''">and second_industry = #{secondIndustry}</if>
+            <if test="corporationName != null  and corporationName != ''">and corporation_name like concat('%',
+                #{corporationName}, '%')
+            </if>
+            <if test="accountStatus != null  and accountStatus != ''">and account_status = #{accountStatus}</if>
+        </where>
+    </select>
+
+    <select id="selectKuaishouAccountById" parameterType="Long" resultMap="KuaishouAccountResult">
+        <include refid="selectKuaishouAccountVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertKuaishouAccount" parameterType="com.ruixuan.jinniu.entity.KuaishouAccount" useGeneratedKeys="true"
+            keyProperty="id">
+        insert into kuaishou_account
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="accountId != null">account_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="projectId != null">project_id,</if>
+            <if test="projectName != null">project_name,</if>
+            <if test="mediaCode != null">media_code,</if>
+            <if test="ksId != null">ks_id,</if>
+            <if test="ksName != null">ks_name,</if>
+            <if test="operatorId != null">operator_id,</if>
+            <if test="operatorLeader != null">operator_leader,</if>
+            <if test="productName != null">product_name,</if>
+            <if test="industry != null">industry,</if>
+            <if test="secondIndustry != null">second_industry,</if>
+            <if test="corporationName != null">corporation_name,</if>
+            <if test="accountStatus != null">account_status,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="accountId != null">#{accountId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="projectId != null">#{projectId},</if>
+            <if test="projectName != null">#{projectName},</if>
+            <if test="mediaCode != null">#{mediaCode},</if>
+            <if test="ksId != null">#{ksId},</if>
+            <if test="ksName != null">#{ksName},</if>
+            <if test="operatorId != null">#{operatorId},</if>
+            <if test="operatorLeader != null">#{operatorLeader},</if>
+            <if test="productName != null">#{productName},</if>
+            <if test="industry != null">#{industry},</if>
+            <if test="secondIndustry != null">#{secondIndustry},</if>
+            <if test="corporationName != null">#{corporationName},</if>
+            <if test="accountStatus != null">#{accountStatus},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouAccount" parameterType="com.ruixuan.jinniu.entity.KuaishouAccount">
+        update kuaishou_account
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="accountId != null">account_id = #{accountId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="projectId != null">project_id = #{projectId},</if>
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="mediaCode != null">media_code = #{mediaCode},</if>
+            <if test="ksId != null">ks_id = #{ksId},</if>
+            <if test="ksName != null">ks_name = #{ksName},</if>
+            <if test="operatorId != null">operator_id = #{operatorId},</if>
+            <if test="operatorLeader != null">operator_leader = #{operatorLeader},</if>
+            <if test="productName != null">product_name = #{productName},</if>
+            <if test="industry != null">industry = #{industry},</if>
+            <if test="secondIndustry != null">second_industry = #{secondIndustry},</if>
+            <if test="corporationName != null">corporation_name = #{corporationName},</if>
+            <if test="accountStatus != null">account_status = #{accountStatus},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKuaishouAccountById" parameterType="Long">
+        delete
+        from kuaishou_account
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteKuaishouAccountByIds" parameterType="String">
+        delete from kuaishou_account where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>