yumeng 2 years ago
parent
commit
c6df048caf

+ 106 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/controller/KuaishouAgentAccountListController.java

@@ -0,0 +1,106 @@
+package com.ruixuan.jinniu.controller;
+
+import java.util.List;
+import javax.servlet.http.HttpServletResponse;
+
+import com.ruixuan.common.annotation.Log;
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.common.enums.BusinessType;
+import com.ruixuan.common.utils.poi.ExcelUtil;
+import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
+import com.ruixuan.jinniu.service.IKuaishouAgentAccountListService;
+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("/agent/account")
+public class KuaishouAgentAccountListController extends BaseController
+{
+    @Autowired
+    private IKuaishouAgentAccountListService kuaishouAgentAccountListService;
+
+    /**
+     * 查询【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(KuaishouAgentAccountList kuaishouAgentAccountList)
+    {
+        startPage();
+        List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
+        return getDataTable(list);
+    }
+
+    /**
+     * 导出【请填写功能名称】列表
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:export')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.EXPORT)
+    @PostMapping("/export")
+    public void export(HttpServletResponse response, KuaishouAgentAccountList kuaishouAgentAccountList)
+    {
+        List<KuaishouAgentAccountList> list = kuaishouAgentAccountListService.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
+        ExcelUtil<KuaishouAgentAccountList> util = new ExcelUtil<KuaishouAgentAccountList>(KuaishouAgentAccountList.class);
+        util.exportExcel(response, list, "【请填写功能名称】数据");
+    }
+
+    /**
+     * 获取【请填写功能名称】详细信息
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:query')")
+    @GetMapping(value = "/{accountId}")
+    public AjaxResult getInfo(@PathVariable("accountId") Long accountId)
+    {
+        return AjaxResult.success(kuaishouAgentAccountListService.selectKuaishouAgentAccountListByAccountId(accountId));
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:add')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList)
+    {
+        return toAjax(kuaishouAgentAccountListService.insertKuaishouAgentAccountList(kuaishouAgentAccountList));
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:edit')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@RequestBody KuaishouAgentAccountList kuaishouAgentAccountList)
+    {
+        return toAjax(kuaishouAgentAccountListService.updateKuaishouAgentAccountList(kuaishouAgentAccountList));
+    }
+
+    /**
+     * 删除【请填写功能名称】
+     */
+    @PreAuthorize("@ss.hasPermi('system:list:remove')")
+    @Log(title = "【请填写功能名称】", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{accountIds}")
+    public AjaxResult remove(@PathVariable Long[] accountIds)
+    {
+        return toAjax(kuaishouAgentAccountListService.deleteKuaishouAgentAccountListByAccountIds(accountIds));
+    }
+}
+

+ 165 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/entity/KuaishouAgentAccountList.java

@@ -0,0 +1,165 @@
+package com.ruixuan.jinniu.entity;
+
+
+import java.util.Date;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import com.ruixuan.common.annotation.Excel;
+import com.ruixuan.common.core.domain.BaseEntity;
+import org.apache.commons.lang3.builder.ToStringBuilder;
+import org.apache.commons.lang3.builder.ToStringStyle;
+
+
+/**
+ * 【请填写功能名称】对象 kuaishou_agent_account_list
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public class KuaishouAgentAccountList extends BaseEntity {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 账户ID
+     */
+    private Long accountId;
+
+    /**
+     * 快手ID
+     */
+    @Excel(name = "快手ID")
+    private Long userId;
+
+    /**
+     * 账户名称
+     */
+    @Excel(name = "账户名称")
+    private String accountName;
+
+    /**
+     * 快手名称
+     */
+    @Excel(name = "快手名称")
+    private String userName;
+
+    /**
+     * 账户创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd")
+    @Excel(name = "账户创建时间", width = 30, dateFormat = "yyyy-MM-dd")
+    private Date accountCreateTime;
+
+    /**
+     * 产品名称
+     */
+    @Excel(name = "产品名称")
+    private String productName;
+
+    /**
+     * 一级行业
+     */
+    @Excel(name = "一级行业")
+    private String industry;
+
+    /**
+     * 二级行业
+     */
+    @Excel(name = "二级行业")
+    private String secondIndustry;
+
+    /**
+     * 公司名称
+     */
+    @Excel(name = "公司名称")
+    private String corporationName;
+
+    public void setAccountId(Long accountId) {
+        this.accountId = accountId;
+    }
+
+    public Long getAccountId() {
+        return accountId;
+    }
+
+    public void setUserId(Long userId) {
+        this.userId = userId;
+    }
+
+    public Long getUserId() {
+        return userId;
+    }
+
+    public void setAccountName(String accountName) {
+        this.accountName = accountName;
+    }
+
+    public String getAccountName() {
+        return accountName;
+    }
+
+    public void setUserName(String userName) {
+        this.userName = userName;
+    }
+
+    public String getUserName() {
+        return userName;
+    }
+
+    public void setAccountCreateTime(Date accountCreateTime) {
+        this.accountCreateTime = accountCreateTime;
+    }
+
+    public Date getAccountCreateTime() {
+        return accountCreateTime;
+    }
+
+    public void setProductName(String productName) {
+        this.productName = productName;
+    }
+
+    public String getProductName() {
+        return productName;
+    }
+
+    public void setIndustry(String industry) {
+        this.industry = industry;
+    }
+
+    public String getIndustry() {
+        return industry;
+    }
+
+    public void setSecondIndustry(String secondIndustry) {
+        this.secondIndustry = secondIndustry;
+    }
+
+    public String getSecondIndustry() {
+        return secondIndustry;
+    }
+
+    public void setCorporationName(String corporationName) {
+        this.corporationName = corporationName;
+    }
+
+    public String getCorporationName() {
+        return corporationName;
+    }
+
+    @Override
+    public String toString() {
+        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
+                .append("accountId", getAccountId())
+                .append("userId", getUserId())
+                .append("accountName", getAccountName())
+                .append("userName", getUserName())
+                .append("accountCreateTime", getAccountCreateTime())
+                .append("productName", getProductName())
+                .append("industry", getIndustry())
+                .append("secondIndustry", getSecondIndustry())
+                .append("corporationName", getCorporationName())
+                .append("createTime", getCreateTime())
+                .append("updateTime", getUpdateTime())
+                .toString();
+    }
+}
+

+ 65 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/mapper/KuaishouAgentAccountListMapper.java

@@ -0,0 +1,65 @@
+package com.ruixuan.jinniu.mapper;
+
+
+
+import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
+
+import java.util.List;
+
+
+/**
+ * 【请填写功能名称】Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface KuaishouAgentAccountListMapper
+{
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public KuaishouAgentAccountList selectKuaishouAgentAccountListByAccountId(Long accountId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<KuaishouAgentAccountList> selectKuaishouAgentAccountListList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 删除【请填写功能名称】
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteKuaishouAgentAccountListByAccountId(Long accountId);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param accountIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouAgentAccountListByAccountIds(Long[] accountIds);
+}

+ 65 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/IKuaishouAgentAccountListService.java

@@ -0,0 +1,65 @@
+package com.ruixuan.jinniu.service;
+
+
+import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
+
+import java.util.List;
+
+
+/**
+ * 【请填写功能名称】Service接口
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+public interface IKuaishouAgentAccountListService
+{
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    public KuaishouAgentAccountList selectKuaishouAgentAccountListByAccountId(Long accountId);
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 【请填写功能名称】集合
+     */
+    public List<KuaishouAgentAccountList> selectKuaishouAgentAccountListList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    public int insertKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    public int updateKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList);
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param accountIds 需要删除的【请填写功能名称】主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouAgentAccountListByAccountIds(Long[] accountIds);
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 结果
+     */
+    public int deleteKuaishouAgentAccountListByAccountId(Long accountId);
+}
+

+ 93 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/impl/KuaishouAgentAccountListServiceImpl.java

@@ -0,0 +1,93 @@
+package com.ruixuan.jinniu.service.impl;
+
+
+import java.util.List;
+
+import com.ruixuan.common.utils.DateUtils;
+import com.ruixuan.jinniu.entity.KuaishouAgentAccountList;
+import com.ruixuan.jinniu.mapper.KuaishouAgentAccountListMapper;
+import com.ruixuan.jinniu.service.IKuaishouAgentAccountListService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+
+/**
+ * 【请填写功能名称】Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-15
+ */
+@Service
+public class KuaishouAgentAccountListServiceImpl implements IKuaishouAgentAccountListService {
+    @Autowired
+    private KuaishouAgentAccountListMapper kuaishouAgentAccountListMapper;
+
+    /**
+     * 查询【请填写功能名称】
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public KuaishouAgentAccountList selectKuaishouAgentAccountListByAccountId(Long accountId) {
+        return kuaishouAgentAccountListMapper.selectKuaishouAgentAccountListByAccountId(accountId);
+    }
+
+    /**
+     * 查询【请填写功能名称】列表
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 【请填写功能名称】
+     */
+    @Override
+    public List<KuaishouAgentAccountList> selectKuaishouAgentAccountListList(KuaishouAgentAccountList kuaishouAgentAccountList) {
+        return kuaishouAgentAccountListMapper.selectKuaishouAgentAccountListList(kuaishouAgentAccountList);
+    }
+
+    /**
+     * 新增【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int insertKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList) {
+        kuaishouAgentAccountList.setCreateTime(DateUtils.getNowDate());
+        return kuaishouAgentAccountListMapper.insertKuaishouAgentAccountList(kuaishouAgentAccountList);
+    }
+
+    /**
+     * 修改【请填写功能名称】
+     *
+     * @param kuaishouAgentAccountList 【请填写功能名称】
+     * @return 结果
+     */
+    @Override
+    public int updateKuaishouAgentAccountList(KuaishouAgentAccountList kuaishouAgentAccountList) {
+        kuaishouAgentAccountList.setUpdateTime(DateUtils.getNowDate());
+        return kuaishouAgentAccountListMapper.updateKuaishouAgentAccountList(kuaishouAgentAccountList);
+    }
+
+    /**
+     * 批量删除【请填写功能名称】
+     *
+     * @param accountIds 需要删除的【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouAgentAccountListByAccountIds(Long[] accountIds) {
+        return kuaishouAgentAccountListMapper.deleteKuaishouAgentAccountListByAccountIds(accountIds);
+    }
+
+    /**
+     * 删除【请填写功能名称】信息
+     *
+     * @param accountId 【请填写功能名称】主键
+     * @return 结果
+     */
+    @Override
+    public int deleteKuaishouAgentAccountListByAccountId(Long accountId) {
+        return kuaishouAgentAccountListMapper.deleteKuaishouAgentAccountListByAccountId(accountId);
+    }
+}
+

+ 101 - 0
ruixuan-live/src/main/resources/mapper/jinniu/KuaishouAgentAccountListMapper.xml

@@ -0,0 +1,101 @@
+<?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.KuaishouAgentAccountListMapper">
+
+    <resultMap type="com.ruixuan.jinniu.entity.KuaishouAgentAccountList" id="KuaishouAgentAccountListResult">
+        <result property="accountId"    column="account_id"    />
+        <result property="userId"    column="user_id"    />
+        <result property="accountName"    column="account_name"    />
+        <result property="userName"    column="user_name"    />
+        <result property="accountCreateTime"    column="account_create_time"    />
+        <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="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+    </resultMap>
+
+    <sql id="selectKuaishouAgentAccountListVo">
+        select account_id, user_id, account_name, user_name, account_create_time, product_name, industry, second_industry, corporation_name, create_time, update_time from kuaishou_agent_account_list
+    </sql>
+
+    <select id="selectKuaishouAgentAccountListList" parameterType="com.ruixuan.jinniu.entity.KuaishouAgentAccountList" resultMap="KuaishouAgentAccountListResult">
+        <include refid="selectKuaishouAgentAccountListVo"/>
+        <where>
+            <if test="userId != null "> and user_id = #{userId}</if>
+            <if test="accountName != null  and accountName != ''"> and account_name like concat('%', #{accountName}, '%')</if>
+            <if test="userName != null  and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
+            <if test="accountCreateTime != null "> and account_create_time = #{accountCreateTime}</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>
+        </where>
+    </select>
+
+    <select id="selectKuaishouAgentAccountListByAccountId" parameterType="Long" resultMap="KuaishouAgentAccountListResult">
+        <include refid="selectKuaishouAgentAccountListVo"/>
+        where account_id = #{accountId}
+    </select>
+
+    <insert id="insertKuaishouAgentAccountList" parameterType="com.ruixuan.jinniu.entity.KuaishouAgentAccountList">
+        insert into kuaishou_agent_account_list
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="accountId != null">account_id,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="accountName != null">account_name,</if>
+            <if test="userName != null">user_name,</if>
+            <if test="accountCreateTime != null">account_create_time,</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="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="userId != null">#{userId},</if>
+            <if test="accountName != null">#{accountName},</if>
+            <if test="userName != null">#{userName},</if>
+            <if test="accountCreateTime != null">#{accountCreateTime},</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="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouAgentAccountList" parameterType="com.ruixuan.jinniu.entity.KuaishouAgentAccountList">
+        update kuaishou_agent_account_list
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="accountName != null">account_name = #{accountName},</if>
+            <if test="userName != null">user_name = #{userName},</if>
+            <if test="accountCreateTime != null">account_create_time = #{accountCreateTime},</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="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where account_id = #{accountId}
+    </update>
+
+    <delete id="deleteKuaishouAgentAccountListByAccountId" parameterType="Long">
+        delete from kuaishou_agent_account_list where account_id = #{accountId}
+    </delete>
+
+    <delete id="deleteKuaishouAgentAccountListByAccountIds" parameterType="String">
+        delete from kuaishou_agent_account_list where account_id in
+        <foreach item="accountId" collection="array" open="(" separator="," close=")">
+            #{accountId}
+        </foreach>
+    </delete>
+</mapper>

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


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