zhaoxian il y a 3 ans
Parent
commit
a82969fc2d

+ 100 - 0
ruixuan-live/src/main/java/com/ruixuan/live/controller/KuaishouLiveCustomerController.java

@@ -0,0 +1,100 @@
+package com.ruixuan.live.controller;
+
+import com.ruixuan.common.core.controller.BaseController;
+import com.ruixuan.common.core.domain.AjaxResult;
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.common.core.page.TableDataInfo;
+import com.ruixuan.live.entity.KuaishouLiveCustomer;
+import com.ruixuan.live.entity.KuaishouLiveCustomerInvoice;
+import com.ruixuan.live.service.IKuaishouLiveCustomerService;
+import io.swagger.annotations.Api;
+import io.swagger.annotations.ApiOperation;
+import io.swagger.annotations.ApiParam;
+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.RequestParam;
+import org.springframework.web.bind.annotation.RestController;
+
+import java.util.List;
+
+/**
+ * 客户管理Controller
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+@Api(tags = "客户管理")
+@RestController
+@RequestMapping("/live/customer")
+public class KuaishouLiveCustomerController extends BaseController {
+    @Autowired
+    private IKuaishouLiveCustomerService kuaishouLiveCustomerService;
+
+    /**
+     * 查询客户管理列表
+     */
+    @GetMapping("/list")
+    @ApiOperation(value = "查询客户列表")
+    public TableDataInfo list(KuaishouLiveCustomer kuaishouLiveCustomer) {
+        startPage();
+        List<KuaishouLiveCustomer> list = kuaishouLiveCustomerService.selectKuaishouLiveCustomerList(kuaishouLiveCustomer);
+        return getDataTable(list);
+    }
+
+    /**
+     * 获取客户管理详细信息
+     */
+    @GetMapping(value = "/queryByKsId")
+    @ApiOperation(value = "获取客户管理详细信息")
+    public AjaxResult getInfo(@ApiParam("ksid") @RequestParam(value = "ksId", required = true) Long ksId) {
+        return AjaxResult.success(kuaishouLiveCustomerService.selectKuaishouLiveCustomerByKsId(ksId));
+    }
+
+    /**
+     * 新增客户管理
+     */
+    @PostMapping(value = "/add")
+    @ApiOperation(value = "新增客户管理")
+    public ResultResponse add(@RequestBody KuaishouLiveCustomer kuaishouLiveCustomer) {
+        try {
+            return kuaishouLiveCustomerService.insertKuaishouLiveCustomer(kuaishouLiveCustomer);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ResultResponse.error("新增失败");
+    }
+
+
+    /**
+     * 上传发票信息
+     */
+    @PostMapping(value = "/addInvoice")
+    @ApiOperation(value = "上传发票信息")
+    public ResultResponse addInvoice(@RequestBody KuaishouLiveCustomerInvoice invoice) {
+        try {
+            return kuaishouLiveCustomerService.addInvoice(invoice);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ResultResponse.error("上传失败");
+    }
+
+    /**
+     * 修改客户管理
+     */
+    @PostMapping(value = "/edit")
+    @ApiOperation(value = "修改客户管理")
+    public ResultResponse edit(@RequestBody KuaishouLiveCustomer kuaishouLiveCustomer) {
+        try {
+            return kuaishouLiveCustomerService.updateKuaishouLiveCustomer(kuaishouLiveCustomer);
+        } catch (Exception e) {
+            e.printStackTrace();
+        }
+        return ResultResponse.error("修改失败");
+    }
+
+}

+ 149 - 0
ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveCustomer.java

@@ -0,0 +1,149 @@
+package com.ruixuan.live.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 客户管理对象 kuaishou_live_customer
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+@Data
+public class KuaishouLiveCustomer {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 快手ID
+     */
+    private Long ksId;
+
+    /**
+     * 客户名称
+     */
+    @ApiModelProperty(name = "客户名称")
+    private String customerName;
+
+    /**
+     * 投放类型
+     */
+    @ApiModelProperty(name = "投放类型")
+    private String launchType;
+
+    /**
+     * 销售负责人Id
+     */
+    @ApiModelProperty(name = "销售负责人Id")
+    private String saleLeaderId;
+
+    /**
+     * 销售负责人
+     */
+    @ApiModelProperty(name = "销售负责人")
+    private String saleLeader;
+
+    /**
+     * 联系电话
+     */
+    @ApiModelProperty(name = "联系电话")
+    private String phone;
+
+    /**
+     * 企业名称
+     */
+    @ApiModelProperty(name = "企业名称")
+    private String businessName;
+
+    /**
+     * 营业执照编码/统一社会信用代码
+     */
+    @ApiModelProperty(name = "营业执照编码/统一社会信用代码")
+    private String licenseCode;
+
+    /**
+     * 以企业主体为推广主体:默认1是,0否
+     */
+    @ApiModelProperty(name = "以企业主体为推广主体:默认1是,0否")
+    private Integer asMainBody;
+
+    /**
+     * 快手小店的链接
+     */
+    @ApiModelProperty(name = "快手小店的链接")
+    private String ksUrl;
+
+    /**
+     * 推广内容
+     */
+    @ApiModelProperty(name = "推广内容")
+    private String sponsoredContent;
+
+    /**
+     * 注册地
+     */
+    @ApiModelProperty(name = "注册地")
+    private String registration;
+
+    /**
+     * 营业执照有效期
+     */
+    @ApiModelProperty(name = "营业执照有效期")
+    private String businessLicenseValidity;
+
+    /**
+     * 计算机软件著作权登记证书有效期
+     */
+    @ApiModelProperty(name = "计算机软件著作权登记证书有效期")
+    private String copyrightValidity;
+
+    /**
+     * 承诺函有效期
+     */
+    @ApiModelProperty(name = "承诺函有效期")
+    private String commitmentValidity;
+
+    /**
+     * 营业执照链接
+     */
+    @ApiModelProperty(name = "营业执照链接")
+    private String businessLicenseUrl;
+
+    /**
+     * 计算机软件著作权登记证书链接
+     */
+    @ApiModelProperty(name = "计算机软件著作权登记证书链接")
+    private String copyrightUrl;
+
+    /**
+     * 承诺函链接
+     */
+    @ApiModelProperty(name = "承诺函链接")
+    private String commitmentUrl;
+
+    /**
+     * 发票状态 0未传,1已传
+     */
+    @ApiModelProperty(name = "发票状态 0未传,1已传")
+    private Integer invoiceStatus;
+
+    /**
+     * 创建人ID
+     */
+    @ApiModelProperty(name = "创建人ID")
+    private String createrId;
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+}

+ 102 - 0
ruixuan-live/src/main/java/com/ruixuan/live/entity/KuaishouLiveCustomerInvoice.java

@@ -0,0 +1,102 @@
+package com.ruixuan.live.entity;
+
+import com.fasterxml.jackson.annotation.JsonFormat;
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import java.util.Date;
+
+/**
+ * 客户管理资质对象 kuaishou_live_customer_invoice
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+@Data
+public class KuaishouLiveCustomerInvoice {
+    private static final long serialVersionUID = 1L;
+
+    /**
+     * 主键ID
+     */
+    private String id;
+
+    /**
+     * 快手ID
+     */
+    @ApiModelProperty(name = "快手ID")
+    private Long ksId;
+
+    /**
+     * 主体名
+     */
+    @ApiModelProperty(name = "主体名")
+    private String mainBodyName;
+
+    /**
+     * 1专票,2普票
+     */
+    @ApiModelProperty(name = "1专票,2普票")
+    private String type;
+
+    /**
+     * 开户许可证链接
+     */
+    @ApiModelProperty(name = "开户许可证链接")
+    private String permitUrl;
+
+    /**
+     * 纳税人证明链接
+     */
+    @ApiModelProperty(name = "纳税人证明链接")
+    private String taxpayerUrl;
+
+    /**
+     * 开户银行
+     */
+    @ApiModelProperty(name = "开户银行")
+    private String bank;
+
+    /**
+     * 银行账号
+     */
+    @ApiModelProperty(name = "银行账号")
+    private String bankCode;
+
+    /**
+     * 纳税人识别号
+     */
+    @ApiModelProperty(name = "纳税人识别号")
+    private String taxpayerIdentificationNumber;
+
+    /**
+     * 地址
+     */
+    @ApiModelProperty(name = "地址")
+    private String address;
+
+    /**
+     * 联系电话
+     */
+    @ApiModelProperty(name = "联系电话")
+    private String phone;
+
+    /**
+     * 创建人ID
+     */
+    @ApiModelProperty(name = "创建人ID")
+    private String createrId;
+
+    /**
+     * 更新时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date updateTime;
+
+    /**
+     * 创建时间
+     */
+    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
+    private Date createTime;
+
+}

+ 63 - 0
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveCustomerInvoiceMapper.java

@@ -0,0 +1,63 @@
+package com.ruixuan.live.mapper;
+
+import com.ruixuan.live.entity.KuaishouLiveCustomerInvoice;
+import org.apache.ibatis.annotations.Param;
+
+import java.util.List;
+
+/**
+ * 客户管理资质Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+public interface KuaishouLiveCustomerInvoiceMapper {
+    /**
+     * 查询客户管理资质
+     *
+     * @param id 客户管理资质主键
+     * @return 客户管理资质
+     */
+    KuaishouLiveCustomerInvoice getByKsIdAndName(@Param("ksId") Long ksId, @Param("mainBodyName") String mainBodyName);
+
+    /**
+     * 查询客户管理资质列表
+     *
+     * @param kuaishouLiveCustomerInvoice 客户管理资质
+     * @return 客户管理资质集合
+     */
+    public List<KuaishouLiveCustomerInvoice> selectKuaishouLiveCustomerInvoiceList(KuaishouLiveCustomerInvoice kuaishouLiveCustomerInvoice);
+
+    /**
+     * 新增客户管理资质
+     *
+     * @param kuaishouLiveCustomerInvoice 客户管理资质
+     * @return 结果
+     */
+    public int insertKuaishouLiveCustomerInvoice(KuaishouLiveCustomerInvoice kuaishouLiveCustomerInvoice);
+
+    /**
+     * 修改客户管理资质
+     *
+     * @param kuaishouLiveCustomerInvoice 客户管理资质
+     * @return 结果
+     */
+    public int updateKuaishouLiveCustomerInvoice(KuaishouLiveCustomerInvoice kuaishouLiveCustomerInvoice);
+
+    /**
+     * 删除客户管理资质
+     *
+     * @param id 客户管理资质主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveCustomerInvoiceById(String id);
+
+    /**
+     * 批量删除客户管理资质
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveCustomerInvoiceByIds(String[] ids);
+
+}

+ 63 - 0
ruixuan-live/src/main/java/com/ruixuan/live/mapper/KuaishouLiveCustomerMapper.java

@@ -0,0 +1,63 @@
+package com.ruixuan.live.mapper;
+
+import com.ruixuan.live.entity.KuaishouLiveBroadcastFiles;
+import com.ruixuan.live.entity.KuaishouLiveCustomer;
+
+import java.util.List;
+
+/**
+ * 客户管理Mapper接口
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+public interface KuaishouLiveCustomerMapper
+{
+    /**
+     * 查询客户管理
+     *
+     * @param ksId 客户管理主键
+     * @return 客户管理
+     */
+    public KuaishouLiveCustomer selectKuaishouLiveCustomerByKsId(Long ksId);
+
+    /**
+     * 查询客户管理列表
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 客户管理集合
+     */
+    public List<KuaishouLiveCustomer> selectKuaishouLiveCustomerList(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    /**
+     * 新增客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    public int insertKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    /**
+     * 修改客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    public int updateKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    /**
+     * 删除客户管理
+     *
+     * @param ksId 客户管理主键
+     * @return 结果
+     */
+    public int deleteKuaishouLiveCustomerByKsId(Long ksId);
+
+    /**
+     * 批量删除客户管理
+     *
+     * @param ksIds 需要删除的数据主键集合
+     * @return 结果
+     */
+    public int deleteKuaishouLiveCustomerByKsIds(Long[] ksIds);
+}

+ 52 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/IKuaishouLiveCustomerService.java

@@ -0,0 +1,52 @@
+package com.ruixuan.live.service;
+
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.live.entity.KuaishouLiveBroadcast;
+import com.ruixuan.live.entity.KuaishouLiveCustomer;
+import com.ruixuan.live.entity.KuaishouLiveCustomerInvoice;
+import org.springframework.web.multipart.MultipartFile;
+
+import java.util.List;
+
+/**
+ * 客户管理Service接口
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+public interface IKuaishouLiveCustomerService
+{
+    /**
+     * 查询客户管理
+     *
+     * @param ksId 客户管理主键
+     * @return 客户管理
+     */
+    public KuaishouLiveCustomer selectKuaishouLiveCustomerByKsId(Long ksId);
+
+    /**
+     * 查询客户管理列表
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 客户管理集合
+     */
+    public List<KuaishouLiveCustomer> selectKuaishouLiveCustomerList(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    /**
+     * 新增客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    public ResultResponse insertKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    /**
+     * 修改客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    public ResultResponse updateKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer);
+
+    ResultResponse addInvoice(KuaishouLiveCustomerInvoice invoice);
+}

+ 94 - 0
ruixuan-live/src/main/java/com/ruixuan/live/service/impl/KuaishouLiveCustomerServiceImpl.java

@@ -0,0 +1,94 @@
+package com.ruixuan.live.service.impl;
+
+import com.ruixuan.common.core.domain.ResultResponse;
+import com.ruixuan.common.utils.Check;
+import com.ruixuan.live.entity.KuaishouLiveCustomer;
+import com.ruixuan.live.entity.KuaishouLiveCustomerInvoice;
+import com.ruixuan.live.mapper.KuaishouLiveCustomerInvoiceMapper;
+import com.ruixuan.live.mapper.KuaishouLiveCustomerMapper;
+import com.ruixuan.live.service.IKuaishouLiveCustomerService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+import java.util.UUID;
+
+/**
+ * 客户管理Service业务层处理
+ *
+ * @author ruoyi
+ * @date 2022-08-01
+ */
+@Service
+public class KuaishouLiveCustomerServiceImpl implements IKuaishouLiveCustomerService {
+    @Autowired
+    private KuaishouLiveCustomerMapper kuaishouLiveCustomerMapper;
+    @Autowired
+    private KuaishouLiveCustomerInvoiceMapper kuaishouLiveCustomerInvoiceMapper;
+
+    /**
+     * 查询客户管理
+     *
+     * @param ksId 客户管理主键
+     * @return 客户管理
+     */
+    @Override
+    public KuaishouLiveCustomer selectKuaishouLiveCustomerByKsId(Long ksId) {
+        return kuaishouLiveCustomerMapper.selectKuaishouLiveCustomerByKsId(ksId);
+    }
+
+    /**
+     * 查询客户管理列表
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 客户管理
+     */
+    @Override
+    public List<KuaishouLiveCustomer> selectKuaishouLiveCustomerList(KuaishouLiveCustomer kuaishouLiveCustomer) {
+        return kuaishouLiveCustomerMapper.selectKuaishouLiveCustomerList(kuaishouLiveCustomer);
+    }
+
+    /**
+     * 新增客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    @Override
+    public ResultResponse insertKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer) {
+        KuaishouLiveCustomer customer = kuaishouLiveCustomerMapper.selectKuaishouLiveCustomerByKsId(kuaishouLiveCustomer.getKsId());
+        if (Check.isNotNull(customer)) {
+            return ResultResponse.error("快手小店ID已存在");
+        }
+        kuaishouLiveCustomerMapper.insertKuaishouLiveCustomer(kuaishouLiveCustomer);
+        return ResultResponse.success();
+    }
+
+    /**
+     * 修改客户管理
+     *
+     * @param kuaishouLiveCustomer 客户管理
+     * @return 结果
+     */
+    @Override
+    public ResultResponse updateKuaishouLiveCustomer(KuaishouLiveCustomer kuaishouLiveCustomer) {
+        kuaishouLiveCustomerMapper.updateKuaishouLiveCustomer(kuaishouLiveCustomer);
+        return ResultResponse.success();
+    }
+
+    @Override
+    public ResultResponse addInvoice(KuaishouLiveCustomerInvoice invoice) {
+        KuaishouLiveCustomerInvoice entity = kuaishouLiveCustomerInvoiceMapper.getByKsIdAndName(invoice.getKsId(), invoice.getMainBodyName());
+        if (Check.isNotNull(entity)) {
+            return ResultResponse.error("客户下已存在该资质主体,请重新填写");
+        }
+        invoice.setId(UUID.randomUUID().toString().replace("-", ""));
+        kuaishouLiveCustomerInvoiceMapper.insertKuaishouLiveCustomerInvoice(invoice);
+        KuaishouLiveCustomer customer = new KuaishouLiveCustomer();
+        customer.setKsId(invoice.getKsId());
+        customer.setInvoiceStatus(1);
+        kuaishouLiveCustomerMapper.updateKuaishouLiveCustomer(customer);
+        return ResultResponse.success();
+    }
+
+}

+ 141 - 0
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveCustomerInvoiceMapper.xml

@@ -0,0 +1,141 @@
+<?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.live.mapper.KuaishouLiveCustomerInvoiceMapper">
+
+    <resultMap type="com.ruixuan.live.entity.KuaishouLiveCustomerInvoice" id="KuaishouLiveCustomerInvoiceResult">
+        <result property="id" column="id"/>
+        <result property="ksId" column="ks_id"/>
+        <result property="mainBodyName" column="main_body_name"/>
+        <result property="type" column="type"/>
+        <result property="permitUrl" column="permit_url"/>
+        <result property="taxpayerUrl" column="taxpayer_url"/>
+        <result property="bank" column="bank"/>
+        <result property="bankCode" column="bank_code"/>
+        <result property="taxpayerIdentificationNumber" column="taxpayer_identification_number"/>
+        <result property="address" column="address"/>
+        <result property="phone" column="phone"/>
+        <result property="createrId" column="creater_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveCustomerInvoiceVo">
+        select id,
+               ks_id,
+               main_body_name,
+               `type`,
+               permit_url,
+               taxpayer_url,
+               bank,
+               bank_code,
+               taxpayer_identification_number,
+               address,
+               phone,
+               creater_id,
+               create_time,
+               update_time
+        from kuaishou_live_customer_invoice
+    </sql>
+
+    <select id="selectKuaishouLiveCustomerInvoiceList"
+            parameterType="com.ruixuan.live.entity.KuaishouLiveCustomerInvoice"
+            resultMap="KuaishouLiveCustomerInvoiceResult">
+        <include refid="selectKuaishouLiveCustomerInvoiceVo"/>
+        <where>
+            <if test="ksId != null ">and ks_id = #{ksId}</if>
+            <if test="mainBodyName != null  and mainBodyName != ''">and main_body_name like concat('%', #{mainBodyName},
+                '%')
+            </if>
+            <if test="permitUrl != null  and permitUrl != ''">and permit_url = #{permitUrl}</if>
+            <if test="type != null  and type != ''">and `type` = #{type}</if>
+            <if test="taxpayerUrl != null  and taxpayerUrl != ''">and taxpayer_url = #{taxpayerUrl}</if>
+            <if test="bank != null  and bank != ''">and bank = #{bank}</if>
+            <if test="bankCode != null  and bankCode != ''">and bank_code = #{bankCode}</if>
+            <if test="taxpayerIdentificationNumber != null  and taxpayerIdentificationNumber != ''">and
+                taxpayer_identification_number = #{taxpayerIdentificationNumber}
+            </if>
+            <if test="address != null  and address != ''">and address = #{address}</if>
+            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
+            <if test="createrId != null  and createrId != ''">and creater_id = #{createrId}</if>
+        </where>
+    </select>
+
+    <select id="getByKsIdAndName" resultMap="KuaishouLiveCustomerInvoiceResult">
+        <include refid="selectKuaishouLiveCustomerInvoiceVo"/>
+        where ks_id = #{ksId}
+        and main_body_name = #{mainBodyName}
+    </select>
+
+    <insert id="insertKuaishouLiveCustomerInvoice" parameterType="com.ruixuan.live.entity.KuaishouLiveCustomerInvoice">
+        insert into kuaishou_live_customer_invoice
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="id != null">id,</if>
+            <if test="ksId != null">ks_id,</if>
+            <if test="mainBodyName != null">main_body_name,</if>
+            <if test="type != null">`type`,</if>
+            <if test="permitUrl != null">permit_url,</if>
+            <if test="taxpayerUrl != null">taxpayer_url,</if>
+            <if test="bank != null">bank,</if>
+            <if test="bankCode != null">bank_code,</if>
+            <if test="taxpayerIdentificationNumber != null">taxpayer_identification_number,</if>
+            <if test="address != null">address,</if>
+            <if test="phone != null">phone,</if>
+            <if test="createrId != null">creater_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="id != null">#{id},</if>
+            <if test="ksId != null">#{ksId},</if>
+            <if test="mainBodyName != null">#{mainBodyName},</if>
+            <if test="type != null">#{type},</if>
+            <if test="permitUrl != null">#{permitUrl},</if>
+            <if test="taxpayerUrl != null">#{taxpayerUrl},</if>
+            <if test="bank != null">#{bank},</if>
+            <if test="bankCode != null">#{bankCode},</if>
+            <if test="taxpayerIdentificationNumber != null">#{taxpayerIdentificationNumber},</if>
+            <if test="address != null">#{address},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="createrId != null">#{createrId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveCustomerInvoice" parameterType="com.ruixuan.live.entity.KuaishouLiveCustomerInvoice">
+        update kuaishou_live_customer_invoice
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="ksId != null">ks_id = #{ksId},</if>
+            <if test="mainBodyName != null">main_body_name = #{mainBodyName},</if>
+            <if test="type != null">`type` = #{type},</if>
+            <if test="permitUrl != null">permit_url = #{permitUrl},</if>
+            <if test="taxpayerUrl != null">taxpayer_url = #{taxpayerUrl},</if>
+            <if test="bank != null">bank = #{bank},</if>
+            <if test="bankCode != null">bank_code = #{bankCode},</if>
+            <if test="taxpayerIdentificationNumber != null">taxpayer_identification_number =
+                #{taxpayerIdentificationNumber},
+            </if>
+            <if test="address != null">address = #{address},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="createrId != null">creater_id = #{createrId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteKuaishouLiveCustomerInvoiceById" parameterType="String">
+        delete
+        from kuaishou_live_customer_invoice
+        where id = #{id}
+    </delete>
+
+    <delete id="deleteKuaishouLiveCustomerInvoiceByIds" parameterType="String">
+        delete from kuaishou_live_customer_invoice where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>

+ 193 - 0
ruixuan-live/src/main/resources/mapper/live/KuaishouLiveCustomerMapper.xml

@@ -0,0 +1,193 @@
+<?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.live.mapper.KuaishouLiveCustomerMapper">
+
+    <resultMap type="com.ruixuan.live.entity.KuaishouLiveCustomer" id="KuaishouLiveCustomerResult">
+        <result property="ksId" column="ks_id"/>
+        <result property="customerName" column="customer_name"/>
+        <result property="launchType" column="launch_type"/>
+        <result property="saleLeaderId" column="sale_leader_id"/>
+        <result property="saleLeader" column="sale_leader"/>
+        <result property="phone" column="phone"/>
+        <result property="businessName" column="business_name"/>
+        <result property="licenseCode" column="license_code"/>
+        <result property="asMainBody" column="as_main_body"/>
+        <result property="ksUrl" column="ks_url"/>
+        <result property="sponsoredContent" column="sponsored_content"/>
+        <result property="registration" column="registration"/>
+        <result property="businessLicenseValidity" column="business_license_validity"/>
+        <result property="copyrightValidity" column="copyright_validity"/>
+        <result property="commitmentValidity" column="commitment_validity"/>
+        <result property="businessLicenseUrl" column="business_license_url"/>
+        <result property="copyrightUrl" column="copyright_url"/>
+        <result property="commitmentUrl" column="commitment_url"/>
+        <result property="invoiceStatus" column="invoice_status"/>
+        <result property="createrId" column="creater_id"/>
+        <result property="createTime" column="create_time"/>
+        <result property="updateTime" column="update_time"/>
+    </resultMap>
+
+    <sql id="selectKuaishouLiveCustomerVo">
+        select ks_id,
+               customer_name,
+               launch_type,
+               sale_leader_id,
+               sale_leader,
+               phone,
+               business_name,
+               license_code,
+               as_main_body,
+               ks_url,
+               sponsored_content,
+               registration,
+               business_license_validity,
+               copyright_validity,
+               commitment_validity,
+               business_license_url,
+               copyright_url,
+               commitment_url,
+               invoice_status
+        from kuaishou_live_customer
+    </sql>
+
+    <select id="selectKuaishouLiveCustomerList" parameterType="com.ruixuan.live.entity.KuaishouLiveCustomer"
+            resultMap="KuaishouLiveCustomerResult">
+        <include refid="selectKuaishouLiveCustomerVo"/>
+        <where>
+            <if test="customerName != null  and customerName != ''">and customer_name like concat('%', #{customerName},
+                '%')
+            </if>
+            <if test="launchType != null  and launchType != ''">and launch_type = #{launchType}</if>
+            <if test="saleLeaderId != null  and saleLeaderId != ''">and sale_leader_id = #{saleLeaderId}</if>
+            <if test="saleLeader != null  and saleLeader != ''">and sale_leader = #{saleLeader}</if>
+            <if test="phone != null  and phone != ''">and phone = #{phone}</if>
+            <if test="businessName != null  and businessName != ''">and business_name like concat('%', #{businessName},
+                '%')
+            </if>
+            <if test="licenseCode != null  and licenseCode != ''">and license_code = #{licenseCode}</if>
+            <if test="asMainBody != null ">and as_main_body = #{asMainBody}</if>
+            <if test="ksUrl != null  and ksUrl != ''">and ks_url = #{ksUrl}</if>
+            <if test="sponsoredContent != null  and sponsoredContent != ''">and sponsored_content =
+                #{sponsoredContent}
+            </if>
+            <if test="registration != null  and registration != ''">and registration = #{registration}</if>
+            <if test="businessLicenseValidity != null  and businessLicenseValidity != ''">and business_license_validity
+                = #{businessLicenseValidity}
+            </if>
+            <if test="copyrightValidity != null  and copyrightValidity != ''">and copyright_validity =
+                #{copyrightValidity}
+            </if>
+            <if test="commitmentValidity != null  and commitmentValidity != ''">and commitment_validity =
+                #{commitmentValidity}
+            </if>
+            <if test="businessLicenseUrl != null  and businessLicenseUrl != ''">and business_license_url =
+                #{businessLicenseUrl}
+            </if>
+            <if test="copyrightUrl != null  and copyrightUrl != ''">and copyright_url = #{copyrightUrl}</if>
+            <if test="commitmentUrl != null  and commitmentUrl != ''">and commitment_url = #{commitmentUrl}</if>
+            <if test="invoiceStatus != null ">and invoice_status = #{invoiceStatus}</if>
+            <if test="createrId != null  and createrId != ''">and creater_id = #{createrId}</if>
+        </where>
+        order by create_time desc
+    </select>
+
+    <select id="selectKuaishouLiveCustomerByKsId" parameterType="Long" resultMap="KuaishouLiveCustomerResult">
+        <include refid="selectKuaishouLiveCustomerVo"/>
+        where ks_id = #{ksId}
+    </select>
+
+    <insert id="insertKuaishouLiveCustomer" parameterType="com.ruixuan.live.entity.KuaishouLiveCustomer">
+        insert into kuaishou_live_customer
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">ks_id,</if>
+            <if test="customerName != null">customer_name,</if>
+            <if test="launchType != null">launch_type,</if>
+            <if test="saleLeaderId != null">sale_leader_id,</if>
+            <if test="saleLeader != null">sale_leader,</if>
+            <if test="phone != null">phone,</if>
+            <if test="businessName != null">business_name,</if>
+            <if test="licenseCode != null">license_code,</if>
+            <if test="asMainBody != null">as_main_body,</if>
+            <if test="ksUrl != null">ks_url,</if>
+            <if test="sponsoredContent != null">sponsored_content,</if>
+            <if test="registration != null">registration,</if>
+            <if test="businessLicenseValidity != null">business_license_validity,</if>
+            <if test="copyrightValidity != null">copyright_validity,</if>
+            <if test="commitmentValidity != null">commitment_validity,</if>
+            <if test="businessLicenseUrl != null">business_license_url,</if>
+            <if test="copyrightUrl != null">copyright_url,</if>
+            <if test="commitmentUrl != null">commitment_url,</if>
+            <if test="invoiceStatus != null">invoice_status,</if>
+            <if test="createrId != null">creater_id,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="ksId != null">#{ksId},</if>
+            <if test="customerName != null">#{customerName},</if>
+            <if test="launchType != null">#{launchType},</if>
+            <if test="saleLeaderId != null">#{saleLeaderId},</if>
+            <if test="saleLeader != null">#{saleLeader},</if>
+            <if test="phone != null">#{phone},</if>
+            <if test="businessName != null">#{businessName},</if>
+            <if test="licenseCode != null">#{licenseCode},</if>
+            <if test="asMainBody != null">#{asMainBody},</if>
+            <if test="ksUrl != null">#{ksUrl},</if>
+            <if test="sponsoredContent != null">#{sponsoredContent},</if>
+            <if test="registration != null">#{registration},</if>
+            <if test="businessLicenseValidity != null">#{businessLicenseValidity},</if>
+            <if test="copyrightValidity != null">#{copyrightValidity},</if>
+            <if test="commitmentValidity != null">#{commitmentValidity},</if>
+            <if test="businessLicenseUrl != null">#{businessLicenseUrl},</if>
+            <if test="copyrightUrl != null">#{copyrightUrl},</if>
+            <if test="commitmentUrl != null">#{commitmentUrl},</if>
+            <if test="invoiceStatus != null">#{invoiceStatus},</if>
+            <if test="createrId != null">#{createrId},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+        </trim>
+    </insert>
+
+    <update id="updateKuaishouLiveCustomer" parameterType="com.ruixuan.live.entity.KuaishouLiveCustomer">
+        update kuaishou_live_customer
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="customerName != null">customer_name = #{customerName},</if>
+            <if test="launchType != null">launch_type = #{launchType},</if>
+            <if test="saleLeaderId != null">sale_leader_id = #{saleLeaderId},</if>
+            <if test="saleLeader != null">sale_leader = #{saleLeader},</if>
+            <if test="phone != null">phone = #{phone},</if>
+            <if test="businessName != null">business_name = #{businessName},</if>
+            <if test="licenseCode != null">license_code = #{licenseCode},</if>
+            <if test="asMainBody != null">as_main_body = #{asMainBody},</if>
+            <if test="ksUrl != null">ks_url = #{ksUrl},</if>
+            <if test="sponsoredContent != null">sponsored_content = #{sponsoredContent},</if>
+            <if test="registration != null">registration = #{registration},</if>
+            <if test="businessLicenseValidity != null">business_license_validity = #{businessLicenseValidity},</if>
+            <if test="copyrightValidity != null">copyright_validity = #{copyrightValidity},</if>
+            <if test="commitmentValidity != null">commitment_validity = #{commitmentValidity},</if>
+            <if test="businessLicenseUrl != null">business_license_url = #{businessLicenseUrl},</if>
+            <if test="copyrightUrl != null">copyright_url = #{copyrightUrl},</if>
+            <if test="commitmentUrl != null">commitment_url = #{commitmentUrl},</if>
+            <if test="invoiceStatus != null">invoice_status = #{invoiceStatus},</if>
+            <if test="createrId != null">creater_id = #{createrId},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+        </trim>
+        where ks_id = #{ksId}
+    </update>
+
+    <delete id="deleteKuaishouLiveCustomerByKsId" parameterType="Long">
+        delete
+        from kuaishou_live_customer
+        where ks_id = #{ksId}
+    </delete>
+
+    <delete id="deleteKuaishouLiveCustomerByKsIds" parameterType="String">
+        delete from kuaishou_live_customer where ks_id in
+        <foreach item="ksId" collection="array" open="(" separator="," close=")">
+            #{ksId}
+        </foreach>
+    </delete>
+</mapper>