Pārlūkot izejas kodu

磁力金牛 初版

zhaoxian 2 gadi atpakaļ
vecāks
revīzija
362780cbf0

+ 1 - 0
ruixuan-framework/src/main/java/com/ruixuan/framework/config/SecurityConfig.java

@@ -123,6 +123,7 @@ public class SecurityConfig extends WebSecurityConfigurerAdapter {
                 .antMatchers("/item/*").permitAll()
                 .antMatchers("/system/user/*").permitAll()
                 .antMatchers("/kuaishou/promoter/*").permitAll()
+                .antMatchers("/rx/**").permitAll()
 
                 // 除上面外的所有请求全部需要鉴权认证
                 .anyRequest().authenticated()

+ 70 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/controller/RxAdvertiserController.java

@@ -0,0 +1,70 @@
+package com.ruixuan.jinniu.controller;
+
+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.RxAdvertiser;
+import com.ruixuan.jinniu.service.IRxAdvertiserService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 广告主Controller
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+@Api(tags = "广告主")
+@RestController
+@RequestMapping("/rx/advertiser")
+public class RxAdvertiserController extends BaseController {
+    @Autowired
+    private IRxAdvertiserService rxAdvertiserService;
+
+    /**
+     * 查询广告主列表
+     */
+    @ApiOperation(value = "查询广告主列表")
+    @GetMapping("/list")
+    public TableDataInfo list(RxAdvertiser rxAdvertiser) {
+        startPage();
+        List<RxAdvertiser> list = rxAdvertiserService.selectRxAdvertiserList(rxAdvertiser);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增广告主
+     */
+    @ApiOperation(value = "新增广告主")
+    @PostMapping(value = "/add")
+    public AjaxResult add(@RequestBody RxAdvertiser rxAdvertiser) {
+        return toAjax(rxAdvertiserService.insertRxAdvertiser(rxAdvertiser));
+    }
+
+    /**
+     * 修改广告主
+     */
+    @ApiOperation(value = "修改广告主")
+    @PostMapping(value = "/edit")
+    public AjaxResult edit(@RequestBody RxAdvertiser rxAdvertiser) {
+        return toAjax(rxAdvertiserService.updateRxAdvertiser(rxAdvertiser));
+    }
+
+    /**
+     * 获取广告主详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(rxAdvertiserService.selectRxAdvertiserById(id));
+    }
+}
+

+ 70 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/controller/RxProjectController.java

@@ -0,0 +1,70 @@
+package com.ruixuan.jinniu.controller;
+
+
+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.RxProject;
+import com.ruixuan.jinniu.service.IRxProjectService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.web.bind.annotation.GetMapping;
+import org.springframework.web.bind.annotation.PathVariable;
+import org.springframework.web.bind.annotation.PostMapping;
+import org.springframework.web.bind.annotation.RequestBody;
+import org.springframework.web.bind.annotation.RequestMapping;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 项目信息Controller
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+@Api(tags = "项目")
+@RestController
+@RequestMapping("/rx/project")
+public class RxProjectController extends BaseController {
+    @Autowired
+    private IRxProjectService rxProjectService;
+
+    /**
+     * 查询项目信息列表
+     */
+    @ApiOperation(value = "查询项目信息列表")
+    @GetMapping("/list")
+    public TableDataInfo list(RxProject rxProject) {
+        startPage();
+        List<RxProject> list = rxProjectService.selectRxProjectList(rxProject);
+        return getDataTable(list);
+    }
+
+    /**
+     * 新增项目信息
+     */
+    @ApiOperation(value = "新增项目信息")
+    @PostMapping(value = "/add")
+    public AjaxResult add(@RequestBody RxProject rxProject) {
+        return toAjax(rxProjectService.insertRxProject(rxProject));
+    }
+
+    /**
+     * 修改项目信息
+     */
+    @ApiOperation(value = "修改项目信息")
+    @PostMapping(value = "/edit")
+    public AjaxResult edit(@RequestBody RxProject rxProject) {
+        return toAjax(rxProjectService.updateRxProject(rxProject));
+    }
+
+    /**
+     * 获取项目信息详细信息
+     */
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable("id") Long id) {
+        return AjaxResult.success(rxProjectService.selectRxProjectById(id));
+    }
+}

+ 75 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/entity/RxAdvertiser.java

@@ -0,0 +1,75 @@
+package com.ruixuan.jinniu.entity;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 广告主对象 rx_advertiser
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+@Data
+@ApiModel(value = "rx_advertiser", description = "广告主对象")
+public class RxAdvertiser implements Serializable {
+
+    private static final long serialVersionUID = -8714484660488441769L;
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 主体名称
+     */
+    @ApiModelProperty(name = "主体名称")
+    private String advertiserName;
+
+    /**
+     * 负责人id
+     */
+    @ApiModelProperty(name = "负责人id")
+    private Long userId;
+
+    /**
+     * 负责人手机
+     */
+    @ApiModelProperty(name = "负责人手机")
+    private String mobile;
+
+    /**
+     * 负责人邮箱
+     */
+    @ApiModelProperty(name = "负责人邮箱")
+    private String email;
+
+    /**
+     * 创建人
+     */
+    @ApiModelProperty(name = "创建人")
+    private Long createBy;
+
+    /**
+     * 修改人
+     */
+    @ApiModelProperty(name = "修改人")
+    private Long updateBy;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 106 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/entity/RxProject.java

@@ -0,0 +1,106 @@
+package com.ruixuan.jinniu.entity;
+
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModel;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.Date;
+
+/**
+ * 项目信息对象 rx_project
+ */
+@Data
+@ApiModel(value = "rx_project", description = "项目信息对象")
+public class RxProject implements Serializable {
+    private static final long serialVersionUID = -124355905527263391L;
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 项目名称
+     */
+    @ApiModelProperty(name = "项目名称")
+    private String projectName;
+
+    /**
+     * 媒体类型 磁力金牛、千川
+     */
+    @ApiModelProperty(name = "媒体类型 磁力金牛、千川")
+    private String mediaCode;
+
+    /**
+     * 供应商
+     */
+    @ApiModelProperty(name = "供应商")
+    private String supplierCode;
+
+    /**
+     * 销售ID
+     */
+    @ApiModelProperty(name = "销售ID")
+    private Long saleId;
+
+    /**
+     * 销售人员
+     */
+    @ApiModelProperty(name = "销售人员")
+    private String saleName;
+
+    /**
+     * 运营负责人ID
+     */
+    @ApiModelProperty(name = "运营负责人ID")
+    private Long businessId;
+
+    /**
+     * 运营负责人
+     */
+    @ApiModelProperty(name = "运营负责人")
+    private String businessName;
+
+    /**
+     * 设计负责人ID
+     */
+    @ApiModelProperty(name = "设计负责人ID")
+    private Long designResponsibleId;
+
+    /**
+     * 设计负责人
+     */
+    @ApiModelProperty(name = "设计负责人")
+    private String designResponsibleName;
+
+    /**
+     * 转化目标
+     */
+    @ApiModelProperty(name = "转化目标")
+    private String ocpxActionType;
+
+    /**
+     * 广告主名称
+     */
+    @ApiModelProperty(name = "广告主名称")
+    private String advertiserName;
+
+    /**
+     * 广告主ID
+     */
+    @ApiModelProperty(name = "广告主ID")
+    private String advertiserId;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+}

+ 54 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/mapper/RxAdvertiserMapper.java

@@ -0,0 +1,54 @@
+package com.ruixuan.jinniu.mapper;
+
+import com.ruixuan.jinniu.entity.RxAdvertiser;
+
+import java.util.List;
+
+/**
+ * 广告主Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+public interface RxAdvertiserMapper {
+    /**
+     * 查询广告主
+     *
+     * @param id 广告主主键
+     * @return 广告主
+     */
+    public RxAdvertiser selectRxAdvertiserById(Long id);
+
+    /**
+     * 查询广告主列表
+     *
+     * @param rxAdvertiser 广告主
+     * @return 广告主集合
+     */
+    public List<RxAdvertiser> selectRxAdvertiserList(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 新增广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    public int insertRxAdvertiser(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 修改广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    public int updateRxAdvertiser(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 删除广告主
+     *
+     * @param id 广告主主键
+     * @return 结果
+     */
+    public int deleteRxAdvertiserById(Long id);
+
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/mapper/RxProjectMapper.java

@@ -0,0 +1,61 @@
+package com.ruixuan.jinniu.mapper;
+
+import com.ruixuan.jinniu.entity.RxProject;
+
+import java.util.List;
+
+/**
+ * 项目信息Mapper接口
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+public interface RxProjectMapper {
+    /**
+     * 查询项目信息
+     *
+     * @param id 项目信息主键
+     * @return 项目信息
+     */
+    public RxProject selectRxProjectById(Long id);
+
+    /**
+     * 查询项目信息列表
+     *
+     * @param rxProject 项目信息
+     * @return 项目信息集合
+     */
+    public List<RxProject> selectRxProjectList(RxProject rxProject);
+
+    /**
+     * 新增项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    public int insertRxProject(RxProject rxProject);
+
+    /**
+     * 修改项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    public int updateRxProject(RxProject rxProject);
+
+    /**
+     * 删除项目信息
+     *
+     * @param id 项目信息主键
+     * @return 结果
+     */
+    public int deleteRxProjectById(Long id);
+
+    /**
+     * 批量删除项目信息
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteRxProjectByIds(Long[] ids);
+}

+ 53 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/IRxAdvertiserService.java

@@ -0,0 +1,53 @@
+package com.ruixuan.jinniu.service;
+
+import com.ruixuan.jinniu.entity.RxAdvertiser;
+
+import java.util.List;
+
+/**
+ * 广告主Service接口
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+public interface IRxAdvertiserService {
+    /**
+     * 查询广告主
+     *
+     * @param id 广告主主键
+     * @return 广告主
+     */
+    public RxAdvertiser selectRxAdvertiserById(Long id);
+
+    /**
+     * 查询广告主列表
+     *
+     * @param rxAdvertiser 广告主
+     * @return 广告主集合
+     */
+    public List<RxAdvertiser> selectRxAdvertiserList(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 新增广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    public int insertRxAdvertiser(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 修改广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    public int updateRxAdvertiser(RxAdvertiser rxAdvertiser);
+
+    /**
+     * 删除广告主信息
+     *
+     * @param id 广告主主键
+     * @return 结果
+     */
+    public int deleteRxAdvertiserById(Long id);
+}

+ 61 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/IRxProjectService.java

@@ -0,0 +1,61 @@
+package com.ruixuan.jinniu.service;
+
+import com.ruixuan.jinniu.entity.RxProject;
+
+import java.util.List;
+
+/**
+ * 项目信息Service接口
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+public interface IRxProjectService {
+    /**
+     * 查询项目信息
+     *
+     * @param id 项目信息主键
+     * @return 项目信息
+     */
+    public RxProject selectRxProjectById(Long id);
+
+    /**
+     * 查询项目信息列表
+     *
+     * @param rxProject 项目信息
+     * @return 项目信息集合
+     */
+    public List<RxProject> selectRxProjectList(RxProject rxProject);
+
+    /**
+     * 新增项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    public int insertRxProject(RxProject rxProject);
+
+    /**
+     * 修改项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    public int updateRxProject(RxProject rxProject);
+
+    /**
+     * 批量删除项目信息
+     *
+     * @param ids 需要删除的项目信息主键集合
+     * @return 结果
+     */
+    public int deleteRxProjectByIds(Long[] ids);
+
+    /**
+     * 删除项目信息信息
+     *
+     * @param id 项目信息主键
+     * @return 结果
+     */
+    public int deleteRxProjectById(Long id);
+}

+ 76 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/impl/RxAdvertiserServiceImpl.java

@@ -0,0 +1,76 @@
+package com.ruixuan.jinniu.service.impl;
+
+import com.ruixuan.jinniu.entity.RxAdvertiser;
+import com.ruixuan.jinniu.mapper.RxAdvertiserMapper;
+import com.ruixuan.jinniu.service.IRxAdvertiserService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 广告主Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+@Service
+public class RxAdvertiserServiceImpl implements IRxAdvertiserService {
+    @Autowired
+    private RxAdvertiserMapper rxAdvertiserMapper;
+
+    /**
+     * 查询广告主
+     *
+     * @param id 广告主主键
+     * @return 广告主
+     */
+    @Override
+    public RxAdvertiser selectRxAdvertiserById(Long id) {
+        return rxAdvertiserMapper.selectRxAdvertiserById(id);
+    }
+
+    /**
+     * 查询广告主列表
+     *
+     * @param rxAdvertiser 广告主
+     * @return 广告主
+     */
+    @Override
+    public List<RxAdvertiser> selectRxAdvertiserList(RxAdvertiser rxAdvertiser) {
+        return rxAdvertiserMapper.selectRxAdvertiserList(rxAdvertiser);
+    }
+
+    /**
+     * 新增广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    @Override
+    public int insertRxAdvertiser(RxAdvertiser rxAdvertiser) {
+        return rxAdvertiserMapper.insertRxAdvertiser(rxAdvertiser);
+    }
+
+    /**
+     * 修改广告主
+     *
+     * @param rxAdvertiser 广告主
+     * @return 结果
+     */
+    @Override
+    public int updateRxAdvertiser(RxAdvertiser rxAdvertiser) {
+        return rxAdvertiserMapper.updateRxAdvertiser(rxAdvertiser);
+    }
+
+    /**
+     * 删除广告主信息
+     *
+     * @param id 广告主主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRxAdvertiserById(Long id) {
+        return rxAdvertiserMapper.deleteRxAdvertiserById(id);
+    }
+}

+ 88 - 0
ruixuan-live/src/main/java/com/ruixuan/jinniu/service/impl/RxProjectServiceImpl.java

@@ -0,0 +1,88 @@
+package com.ruixuan.jinniu.service.impl;
+
+
+import com.ruixuan.jinniu.entity.RxProject;
+import com.ruixuan.jinniu.mapper.RxProjectMapper;
+import com.ruixuan.jinniu.service.IRxProjectService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * 项目信息Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2023-03-14
+ */
+@Service
+public class RxProjectServiceImpl implements IRxProjectService {
+    @Autowired
+    private RxProjectMapper rxProjectMapper;
+
+    /**
+     * 查询项目信息
+     *
+     * @param id 项目信息主键
+     * @return 项目信息
+     */
+    @Override
+    public RxProject selectRxProjectById(Long id) {
+        return rxProjectMapper.selectRxProjectById(id);
+    }
+
+    /**
+     * 查询项目信息列表
+     *
+     * @param rxProject 项目信息
+     * @return 项目信息
+     */
+    @Override
+    public List<RxProject> selectRxProjectList(RxProject rxProject) {
+        return rxProjectMapper.selectRxProjectList(rxProject);
+    }
+
+    /**
+     * 新增项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    @Override
+    public int insertRxProject(RxProject rxProject) {
+        return rxProjectMapper.insertRxProject(rxProject);
+    }
+
+    /**
+     * 修改项目信息
+     *
+     * @param rxProject 项目信息
+     * @return 结果
+     */
+    @Override
+    public int updateRxProject(RxProject rxProject) {
+        return rxProjectMapper.updateRxProject(rxProject);
+    }
+
+    /**
+     * 批量删除项目信息
+     *
+     * @param ids 需要删除的项目信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRxProjectByIds(Long[] ids) {
+        return rxProjectMapper.deleteRxProjectByIds(ids);
+    }
+
+    /**
+     * 删除项目信息信息
+     *
+     * @param id 项目信息主键
+     * @return 结果
+     */
+    @Override
+    public int deleteRxProjectById(Long id) {
+        return rxProjectMapper.deleteRxProjectById(id);
+    }
+}

+ 102 - 0
ruixuan-live/src/main/resources/mapper/rx/RxAdvertiserMapper.xml

@@ -0,0 +1,102 @@
+<?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.RxAdvertiserMapper">
+
+    <resultMap type="com.ruixuan.jinniu.entity.RxAdvertiser" id="RxAdvertiserResult">
+        <result property="id" column="id"/>
+        <result property="advertiserName" column="advertiser_name"/>
+        <result property="userId" column="user_id"/>
+        <result property="mobile" column="mobile"/>
+        <result property="email" column="email"/>
+        <result property="createBy" column="create_by"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateBy" column="update_by"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectRxAdvertiserVo">
+        select id,
+               advertiser_name,
+               user_id,
+               mobile,
+               email,
+               create_by,
+               create_time,
+               update_by,
+               update_time
+        from rx_advertiser
+    </sql>
+
+    <select id="selectRxAdvertiserList" parameterType="com.ruixuan.jinniu.entity.RxAdvertiser" resultMap="RxAdvertiserResult">
+        <include refid="selectRxAdvertiserVo"/>
+        <where>
+            <if test="advertiserName != null  and advertiserName != ''">and advertiser_name like concat('%',
+                #{advertiserName}, '%')
+            </if>
+            <if test="userId != null  and userId != ''">and user_id = #{userId}</if>
+            <if test="mobile != null  and mobile != ''">and mobile = #{mobile}</if>
+            <if test="email != null  and email != ''">and email = #{email}</if>
+        </where>
+    </select>
+
+    <select id="selectRxAdvertiserById" parameterType="Long" resultMap="RxAdvertiserResult">
+        <include refid="selectRxAdvertiserVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertRxAdvertiser" parameterType="com.ruixuan.jinniu.entity.RxAdvertiser">
+        insert into rx_advertiser
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="advertiserName != null and advertiserName != ''">advertiser_name,</if>
+            <if test="userId != null">user_id,</if>
+            <if test="mobile != null and mobile != ''">mobile,</if>
+            <if test="email != null and email != ''">email,</if>
+            <if test="createBy != null and createBy != ''">create_by,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateBy != null">update_by,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="advertiserName != null and advertiserName != ''">#{advertiserName},</if>
+            <if test="userId != null">#{userId},</if>
+            <if test="mobile != null and mobile != ''">#{mobile},</if>
+            <if test="email != null and email != ''">#{email},</if>
+            <if test="createBy != null and createBy != ''">#{createBy},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateBy != null">#{updateBy},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateRxAdvertiser" parameterType="com.ruixuan.jinniu.entity.RxAdvertiser">
+        update rx_advertiser
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="advertiserName != null and advertiserName != ''">advertiser_name = #{advertiserName},</if>
+            <if test="userId != null">user_id = #{userId},</if>
+            <if test="mobile != null and mobile != ''">mobile = #{mobile},</if>
+            <if test="email != null and email != ''">email = #{email},</if>
+            <if test="createBy != null and createBy != ''">create_by = #{createBy},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateBy != null">update_by = #{updateBy},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteRxAdvertiserById" parameterType="Long">
+        delete
+        from rx_advertiser
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteRxAdvertiserByIds" parameterType="String">
+        delete from rx_advertiser where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 144 - 0
ruixuan-live/src/main/resources/mapper/rx/RxProjectMapper.xml

@@ -0,0 +1,144 @@
+<?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.RxProjectMapper">
+
+    <resultMap type="com.ruixuan.jinniu.entity.RxProject" id="RxProjectResult">
+        <result property="id" column="id"/>
+        <result property="projectName" column="project_name"/>
+        <result property="mediaCode" column="media_code"/>
+        <result property="supplierCode" column="supplier_code"/>
+        <result property="saleId" column="sale_id"/>
+        <result property="saleName" column="sale_name"/>
+        <result property="businessId" column="business_id"/>
+        <result property="businessName" column="business_name"/>
+        <result property="designResponsibleId" column="design_responsible_id"/>
+        <result property="designResponsibleName" column="design_responsible_name"/>
+        <result property="ocpxActionType" column="ocpx_action_type"/>
+        <result property="advertiserName" column="advertiser_name"/>
+        <result property="advertiserId" column="advertiser_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectRxProjectVo">
+        select id,
+               project_name,
+               media_code,
+               supplier_code,
+               sale_id,
+               sale_name,
+               business_id,
+               business_name,
+               design_responsible_id,
+               design_responsible_name,
+               ocpx_action_type,
+               advertiser_name,
+               advertiser_id,
+               create_time,
+               update_time
+        from rx_project
+    </sql>
+
+    <select id="selectRxProjectList" parameterType="com.ruixuan.jinniu.entity.RxProject" resultMap="RxProjectResult">
+        <include refid="selectRxProjectVo"/>
+        <where>
+            <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="supplierCode != null  and supplierCode != ''">and supplier_code = #{supplierCode}</if>
+            <if test="saleId != null ">and sale_id = #{saleId}</if>
+            <if test="saleName != null  and saleName != ''">and sale_name like concat('%', #{saleName}, '%')</if>
+            <if test="businessId != null ">and business_id = #{businessId}</if>
+            <if test="businessName != null  and businessName != ''">and business_name like concat('%', #{businessName},
+                '%')
+            </if>
+            <if test="designResponsibleId != null ">and design_responsible_id = #{designResponsibleId}</if>
+            <if test="designResponsibleName != null  and designResponsibleName != ''">and design_responsible_name like
+                concat('%', #{designResponsibleName}, '%')
+            </if>
+            <if test="ocpxActionType != null  and ocpxActionType != ''">and ocpx_action_type = #{ocpxActionType}</if>
+            <if test="advertiserName != null  and advertiserName != ''">and advertiser_name like concat('%',
+                #{advertiserName}, '%')
+            </if>
+            <if test="advertiserId != null  and advertiserId != ''">and advertiser_id = #{advertiserId}</if>
+        </where>
+    </select>
+
+    <select id="selectRxProjectById" parameterType="Long" resultMap="RxProjectResult">
+        <include refid="selectRxProjectVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertRxProject" parameterType="com.ruixuan.jinniu.entity.RxProject" useGeneratedKeys="true" keyProperty="id">
+        insert into rx_project
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="projectName != null">project_name,</if>
+            <if test="mediaCode != null">media_code,</if>
+            <if test="supplierCode != null">supplier_code,</if>
+            <if test="saleId != null">sale_id,</if>
+            <if test="saleName != null">sale_name,</if>
+            <if test="businessId != null">business_id,</if>
+            <if test="businessName != null">business_name,</if>
+            <if test="designResponsibleId != null">design_responsible_id,</if>
+            <if test="designResponsibleName != null">design_responsible_name,</if>
+            <if test="ocpxActionType != null">ocpx_action_type,</if>
+            <if test="advertiserName != null">advertiser_name,</if>
+            <if test="advertiserId != null">advertiser_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="projectName != null">#{projectName},</if>
+            <if test="mediaCode != null">#{mediaCode},</if>
+            <if test="supplierCode != null">#{supplierCode},</if>
+            <if test="saleId != null">#{saleId},</if>
+            <if test="saleName != null">#{saleName},</if>
+            <if test="businessId != null">#{businessId},</if>
+            <if test="businessName != null">#{businessName},</if>
+            <if test="designResponsibleId != null">#{designResponsibleId},</if>
+            <if test="designResponsibleName != null">#{designResponsibleName},</if>
+            <if test="ocpxActionType != null">#{ocpxActionType},</if>
+            <if test="advertiserName != null">#{advertiserName},</if>
+            <if test="advertiserId != null">#{advertiserId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateRxProject" parameterType="com.ruixuan.jinniu.entity.RxProject">
+        update rx_project
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="projectName != null">project_name = #{projectName},</if>
+            <if test="mediaCode != null">media_code = #{mediaCode},</if>
+            <if test="supplierCode != null">supplier_code = #{supplierCode},</if>
+            <if test="saleId != null">sale_id = #{saleId},</if>
+            <if test="saleName != null">sale_name = #{saleName},</if>
+            <if test="businessId != null">business_id = #{businessId},</if>
+            <if test="businessName != null">business_name = #{businessName},</if>
+            <if test="designResponsibleId != null">design_responsible_id = #{designResponsibleId},</if>
+            <if test="designResponsibleName != null">design_responsible_name = #{designResponsibleName},</if>
+            <if test="ocpxActionType != null">ocpx_action_type = #{ocpxActionType},</if>
+            <if test="advertiserName != null">advertiser_name = #{advertiserName},</if>
+            <if test="advertiserId != null">advertiser_id = #{advertiserId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteRxProjectById" parameterType="Long">
+        delete
+        from rx_project
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteRxProjectByIds" parameterType="String">
+        delete from rx_project where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>