Sfoglia il codice sorgente

多小程序迁移

yfh 1 settimana fa
parent
commit
377455907b

+ 115 - 0
fs-admin/src/main/java/com/fs/web/controller/system/FsCoursePlaySourceConfigController.java

@@ -0,0 +1,115 @@
+package com.fs.web.controller.system;
+
+import com.fs.common.annotation.Log;
+import com.fs.common.core.controller.BaseController;
+import com.fs.common.core.domain.AjaxResult;
+import com.fs.common.core.page.TableDataInfo;
+import com.fs.common.enums.BusinessType;
+import com.fs.common.utils.ServletUtils;
+import com.fs.common.utils.bean.BeanUtils;
+import com.fs.core.security.LoginUser;
+import com.fs.core.web.service.TokenService;
+import com.fs.store.domain.FsCoursePlaySourceConfig;
+import com.fs.store.service.IFsCoursePlaySourceConfigService;
+import com.fs.system.param.FsCoursePlaySourceConfigCreateParam;
+import com.fs.system.param.FsCoursePlaySourceConfigEditParam;
+import com.fs.system.service.ISysConfigService;
+import com.github.pagehelper.PageHelper;
+import lombok.AllArgsConstructor;
+import org.apache.commons.collections.CollectionUtils;
+import org.springframework.security.access.prepost.PreAuthorize;
+import org.springframework.web.bind.annotation.*;
+
+import javax.validation.Valid;
+import java.time.LocalDateTime;
+import java.util.*;
+
+@RestController
+@RequestMapping("/course/playSourceConfig")
+@AllArgsConstructor
+public class FsCoursePlaySourceConfigController extends BaseController {
+
+    private final IFsCoursePlaySourceConfigService fsCoursePlaySourceConfigService;
+    private final TokenService tokenService;
+    private final ISysConfigService configService;
+
+//    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:list')")
+    @GetMapping("/list")
+    public TableDataInfo list(@RequestParam(required = false) String name,
+                              @RequestParam(required = false) String appid,
+                              @RequestParam(required = false) Integer isMall,
+                              @RequestParam(required = false, defaultValue = "1") Integer pageNum,
+                              @RequestParam(required = false, defaultValue = "10") Integer pageSize,
+                              @RequestParam(required = false) Long companyId
+    ) {
+        FsCoursePlaySourceConfig fsCoursePlaySourceConfig = new FsCoursePlaySourceConfig();
+        fsCoursePlaySourceConfig.setName(name);
+        fsCoursePlaySourceConfig.setAppid(appid);
+        fsCoursePlaySourceConfig.setIsMall(isMall);
+        fsCoursePlaySourceConfig.setCompanyId(companyId);
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        fsCoursePlaySourceConfig.setCreateUserId(loginUser.getUser().getUserId());
+        fsCoursePlaySourceConfig.setCreateDeptId(loginUser.getUser().getDeptId());
+
+        PageHelper.startPage(pageNum, pageSize);
+        List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigList(fsCoursePlaySourceConfig);
+        return getDataTable(list);
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:query')")
+    @GetMapping(value = "/{id}")
+    public AjaxResult getInfo(@PathVariable Long id) {
+        FsCoursePlaySourceConfig config = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigById(id);
+        if (Objects.isNull(config)) {
+            return AjaxResult.success(null);
+        }
+        return AjaxResult.success(config);
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:add')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.INSERT)
+    @PostMapping
+    public AjaxResult add(@Valid @RequestBody FsCoursePlaySourceConfigCreateParam param) {
+        FsCoursePlaySourceConfig fsCoursePlaySourceConfig = new FsCoursePlaySourceConfig();
+        fsCoursePlaySourceConfig.setAppid(param.getAppid());
+        fsCoursePlaySourceConfig.setIsMall(0);
+        List<FsCoursePlaySourceConfig> list = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigList(fsCoursePlaySourceConfig);
+        if (CollectionUtils.isNotEmpty(list) && !list.get(0).getAppid().equals(param.getAppid())) {
+            return AjaxResult.error("appid已存在");
+        }
+        LoginUser loginUser = tokenService.getLoginUser(ServletUtils.getRequest());
+        FsCoursePlaySourceConfig config = new FsCoursePlaySourceConfig();
+        config.setCreateUserId(loginUser.getUser().getUserId());
+        config.setCreateDeptId(loginUser.getUser().getDeptId());
+        BeanUtils.copyProperties(param, config);
+
+        config.setIsDel(0);
+        config.setCreateTime(new Date());
+        fsCoursePlaySourceConfigService.insertFsCoursePlaySourceConfig(config);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:edit')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.UPDATE)
+    @PutMapping
+    public AjaxResult edit(@Valid @RequestBody FsCoursePlaySourceConfigEditParam param) {
+        FsCoursePlaySourceConfig config = fsCoursePlaySourceConfigService.selectFsCoursePlaySourceConfigById(param.getId());
+        if (Objects.isNull(config)) {
+            return AjaxResult.error("点播播放源配置不存在");
+        }
+        BeanUtils.copyProperties(param, config);
+        fsCoursePlaySourceConfigService.updateFsCoursePlaySourceConfig(config);
+        return AjaxResult.success();
+    }
+
+    @PreAuthorize("@ss.hasPermi('course:playSourceConfig:remove')")
+    @Log(title = "点播播放源配置", businessType = BusinessType.DELETE)
+    @DeleteMapping("/{ids}")
+    public AjaxResult remove(@PathVariable Long[] ids) {
+
+        fsCoursePlaySourceConfigService.deleteFsCoursePlaySourceConfigByIds(ids);
+        return AjaxResult.success();
+    }
+
+
+}

+ 103 - 0
fs-service-system/src/main/java/com/fs/store/domain/FsCoursePlaySourceConfig.java

@@ -0,0 +1,103 @@
+package com.fs.store.domain;
+
+import com.fs.common.core.domain.BaseEntity;
+import lombok.Data;
+import lombok.EqualsAndHashCode;
+
+import java.time.LocalDateTime;
+import java.util.List;
+
+/**
+ * 点播播放源配置对象 fs_course_play_source_config
+ *
+ * @author fs
+ * @date 2025-11-27
+ */
+@Data
+@EqualsAndHashCode(callSuper = true)
+public class FsCoursePlaySourceConfig extends BaseEntity {
+
+    /**
+     * 主键ID
+     */
+    private Long id;
+
+    /**
+     * 小程序/公众号名称
+     */
+    private String name;
+
+    /**
+     * 小程序/公众号appid
+     */
+    private String appid;
+
+    /**
+     * 小程序/公众号secret
+     */
+    private String secret;
+
+    /**
+     * 小程序/公众号icon图标
+     */
+    private String img;
+
+    /**
+     * 小程序/公众号原始id
+     */
+    private String originalId;
+
+    /**
+     * token
+     */
+    private String token;
+
+    /**
+     * aesKey
+     */
+    private String aesKey;
+
+    /**
+     * msgDataFormat
+     */
+    private String msgDataFormat;
+
+    /**
+     * 类型 1小程序 2公众号
+     */
+    private Integer type;
+
+    /**
+     * 是否删除 0正常 1删除
+     */
+    private Integer isDel;
+
+    /**
+     * 公司ID
+     */
+    private Long companyId;
+
+    /**
+     * 销售公司ids 用于判定销售公司可见编辑列表
+     */
+    private String setCompanyIds;
+    /**
+     * 销售ID
+     */
+    private Long companyUserId;
+    // 创建人
+    private Long createUserId;
+    // 创建部门
+    private Long createDeptId;
+
+    /**
+     * 是否是互医/商城小程序
+     */
+    private Integer isMall;
+
+    /**
+     * 小程序状态:0正常,1半封禁,2封禁
+     */
+    private Integer status;
+
+}

+ 61 - 0
fs-service-system/src/main/java/com/fs/store/service/IFsCoursePlaySourceConfigService.java

@@ -0,0 +1,61 @@
+package com.fs.store.service;
+
+
+import java.util.List;
+import com.fs.store.domain.FsCoursePlaySourceConfig;
+
+/**
+ * 点播播放源配置Service接口
+ *
+ * @author fs
+ * @date 2025-11-27
+ */
+public interface IFsCoursePlaySourceConfigService {
+    /**
+     * 查询点播播放源配置
+     *
+     * @param id 点播播放源配置主键
+     * @return 点播播放源配置
+     */
+    FsCoursePlaySourceConfig selectFsCoursePlaySourceConfigById(Long id);
+
+    /**
+     * 查询点播播放源配置列表
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 点播播放源配置集合
+     */
+    List<FsCoursePlaySourceConfig> selectFsCoursePlaySourceConfigList(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 新增点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    int insertFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 修改点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    int updateFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 批量删除点播播放源配置
+     *
+     * @param ids 需要删除的点播播放源配置主键集合
+     * @return 结果
+     */
+    int deleteFsCoursePlaySourceConfigByIds(Long[] ids);
+
+    /**
+     * 删除点播播放源配置信息
+     *
+     * @param id 点播播放源配置主键
+     * @return 结果
+     */
+    int deleteFsCoursePlaySourceConfigById(Long id);
+}

+ 96 - 0
fs-service-system/src/main/java/com/fs/store/service/impl/FsCoursePlaySourceConfigServiceImpl.java

@@ -0,0 +1,96 @@
+package com.fs.store.service.impl;
+
+import com.fs.store.domain.FsCoursePlaySourceConfig;
+import com.fs.system.mapper.FsCoursePlaySourceConfigMapper;
+import com.fs.store.service.IFsCoursePlaySourceConfigService;
+
+import java.util.List;
+import com.fs.common.utils.DateUtils;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+/**
+ * 点播播放源配置Service业务层处理
+ *
+ * @author fs
+ * @date 2025-11-27
+ */
+@Service
+public class FsCoursePlaySourceConfigServiceImpl  implements IFsCoursePlaySourceConfigService {
+
+    @Autowired
+    private FsCoursePlaySourceConfigMapper baseMapper;
+    /**
+     * 查询点播播放源配置
+     *
+     * @param id 点播播放源配置主键
+     * @return 点播播放源配置
+     */
+    @Override
+    public FsCoursePlaySourceConfig selectFsCoursePlaySourceConfigById(Long id)
+    {
+        return baseMapper.selectFsCoursePlaySourceConfigById(id);
+    }
+
+    /**
+     * 查询点播播放源配置列表
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 点播播放源配置
+     */
+    @Override
+    public List<FsCoursePlaySourceConfig> selectFsCoursePlaySourceConfigList(FsCoursePlaySourceConfig fsCoursePlaySourceConfig)
+    {
+        return baseMapper.selectFsCoursePlaySourceConfigList(fsCoursePlaySourceConfig);
+    }
+
+    /**
+     * 新增点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    @Override
+    public int insertFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig)
+    {
+        fsCoursePlaySourceConfig.setCreateTime(DateUtils.getNowDate());
+        return baseMapper.insertFsCoursePlaySourceConfig(fsCoursePlaySourceConfig);
+    }
+
+    /**
+     * 修改点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    @Override
+    public int updateFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig)
+    {
+        fsCoursePlaySourceConfig.setUpdateTime(DateUtils.getNowDate());
+        return baseMapper.updateFsCoursePlaySourceConfig(fsCoursePlaySourceConfig);
+    }
+
+    /**
+     * 批量删除点播播放源配置
+     *
+     * @param ids 需要删除的点播播放源配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsCoursePlaySourceConfigByIds(Long[] ids)
+    {
+        return baseMapper.deleteFsCoursePlaySourceConfigByIds(ids);
+    }
+
+    /**
+     * 删除点播播放源配置信息
+     *
+     * @param id 点播播放源配置主键
+     * @return 结果
+     */
+    @Override
+    public int deleteFsCoursePlaySourceConfigById(Long id)
+    {
+        return baseMapper.deleteFsCoursePlaySourceConfigById(id);
+    }
+}

+ 61 - 0
fs-service-system/src/main/java/com/fs/system/mapper/FsCoursePlaySourceConfigMapper.java

@@ -0,0 +1,61 @@
+package com.fs.system.mapper;
+
+import com.fs.store.domain.FsCoursePlaySourceConfig;
+
+import java.util.List;
+
+/**
+ * 点播播放源配置Mapper接口
+ *
+ * @author fs
+ * @date 2025-11-27
+ */
+public interface FsCoursePlaySourceConfigMapper {
+    /**
+     * 查询点播播放源配置
+     *
+     * @param id 点播播放源配置主键
+     * @return 点播播放源配置
+     */
+    FsCoursePlaySourceConfig selectFsCoursePlaySourceConfigById(Long id);
+
+    /**
+     * 查询点播播放源配置列表
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 点播播放源配置集合
+     */
+    List<FsCoursePlaySourceConfig> selectFsCoursePlaySourceConfigList(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 新增点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    int insertFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 修改点播播放源配置
+     *
+     * @param fsCoursePlaySourceConfig 点播播放源配置
+     * @return 结果
+     */
+    int updateFsCoursePlaySourceConfig(FsCoursePlaySourceConfig fsCoursePlaySourceConfig);
+
+    /**
+     * 删除点播播放源配置
+     *
+     * @param id 点播播放源配置主键
+     * @return 结果
+     */
+    int deleteFsCoursePlaySourceConfigById(Long id);
+
+    /**
+     * 批量删除点播播放源配置
+     *
+     * @param ids 需要删除的数据主键集合
+     * @return 结果
+     */
+    int deleteFsCoursePlaySourceConfigByIds(Long[] ids);
+}

+ 60 - 0
fs-service-system/src/main/java/com/fs/system/param/FsCoursePlaySourceConfigCreateParam.java

@@ -0,0 +1,60 @@
+package com.fs.system.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotBlank;
+import javax.validation.constraints.NotNull;
+
+@Data
+public class FsCoursePlaySourceConfigCreateParam {
+
+    @NotBlank(message = "名称不能为空")
+    @ApiModelProperty("小程序/公众号名称")
+    private String name;
+
+    @NotBlank(message = "appid不能为空")
+    @ApiModelProperty("小程序/公众号appid")
+    private String appid;
+
+    @NotBlank(message = "secret不能为空")
+    @ApiModelProperty("小程序/公众号secret")
+    private String secret;
+
+    @ApiModelProperty("小程序/公众号icon图标")
+    private String img;
+
+    @ApiModelProperty("小程序/公众号原始id")
+    private String originalId;
+
+    @NotBlank(message = "token不能为空")
+    @ApiModelProperty("token")
+    private String token;
+
+    @NotBlank(message = "aesKey不能为空")
+    @ApiModelProperty("aesKey")
+    private String aesKey;
+
+    @NotBlank(message = "msgDataFormat不能为空")
+    @ApiModelProperty("msgDataFormat")
+    private String msgDataFormat;
+
+    @NotNull(message = "类型不能为空")
+    @ApiModelProperty("类型 1主要小程序 2公众号 3炮灰小程序")
+    private Integer type;
+
+    @ApiModelProperty("所属公司")
+    private Long companyId;
+    /**
+     * 销售公司ids 用于判定销售公司可见编辑列表
+     */
+    @ApiModelProperty("销售公司ids 用于判定销售公司可见编辑列表")
+    private String setCompanyIds;
+
+    @ApiModelProperty("是否是互医/商城小程序")
+    private Integer isMall;
+    private Long createDeptId;
+
+    @ApiModelProperty("小程序状态:0正常,1半封禁,2封禁")
+    private Integer status;
+}

+ 57 - 0
fs-service-system/src/main/java/com/fs/system/param/FsCoursePlaySourceConfigEditParam.java

@@ -0,0 +1,57 @@
+package com.fs.system.param;
+
+import io.swagger.annotations.ApiModelProperty;
+import lombok.Data;
+
+import javax.validation.constraints.NotNull;
+
+@Data
+public class FsCoursePlaySourceConfigEditParam {
+
+    @NotNull(message = "主键ID不能为空")
+    @ApiModelProperty("主键ID")
+    private Long id;
+
+    @ApiModelProperty("小程序/公众号名称")
+    private String name;
+
+    @ApiModelProperty("小程序/公众号appid")
+    private String appid;
+
+    @ApiModelProperty("小程序/公众号secret")
+    private String secret;
+
+    @ApiModelProperty("小程序/公众号icon图标")
+    private String img;
+
+    @ApiModelProperty("小程序/公众号原始id")
+    private String originalId;
+
+    @ApiModelProperty("token")
+    private String token;
+
+    @ApiModelProperty("aesKey")
+    private String aesKey;
+
+    @ApiModelProperty("msgDataFormat")
+    private String msgDataFormat;
+
+    @ApiModelProperty("类型 1小程序 2公众号")
+    private Integer type;
+
+    @ApiModelProperty("所属公司")
+    private Long companyId;
+
+    /**
+     * 销售公司ids 用于判定销售公司可见编辑列表
+     */
+    @ApiModelProperty("销售公司ids 用于判定销售公司可见编辑列表")
+    private String setCompanyIds;
+
+    @ApiModelProperty("是否是互医/商城小程序")
+    private Integer isMall;
+    private Long createDeptId;
+
+    @ApiModelProperty("小程序状态:0正常,1半封禁,2封禁")
+    private Integer status;
+}

+ 139 - 0
fs-service-system/src/main/resources/mapper/system/FsCoursePlaySourceConfigMapper.xml

@@ -0,0 +1,139 @@
+<?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.fs.system.mapper.FsCoursePlaySourceConfigMapper">
+
+    <resultMap type="FsCoursePlaySourceConfig" id="FsCoursePlaySourceConfigResult">
+        <result property="id"    column="id"    />
+        <result property="name"    column="name"    />
+        <result property="appid"    column="appid"    />
+        <result property="secret"    column="secret"    />
+        <result property="img"    column="img"    />
+        <result property="originalId"    column="original_id"    />
+        <result property="token"    column="token"    />
+        <result property="aesKey"    column="aes_key"    />
+        <result property="msgDataFormat"    column="msg_data_format"    />
+        <result property="type"    column="type"    />
+        <result property="isDel"    column="is_del"    />
+        <result property="createTime"    column="create_time"    />
+        <result property="updateTime"    column="update_time"    />
+        <result property="companyId"    column="company_id"    />
+        <result property="companyUserId"    column="company_user_id"    />
+        <result property="createUserId"    column="create_user_id"    />
+        <result property="createDeptId"    column="create_dept_id"    />
+        <result property="isMall"    column="is_mall"    />
+        <result property="setCompanyIds"    column="set_company_ids"    />
+    </resultMap>
+
+    <sql id="selectFsCoursePlaySourceConfigVo">
+        select id, name, appid, secret, img, original_id, token, aes_key, msg_data_format, type, is_del, create_time, update_time, company_id, company_user_id, create_user_id, create_dept_id, is_mall, set_company_ids from fs_course_play_source_config
+    </sql>
+
+    <select id="selectFsCoursePlaySourceConfigList" parameterType="FsCoursePlaySourceConfig" resultMap="FsCoursePlaySourceConfigResult">
+        <include refid="selectFsCoursePlaySourceConfigVo"/>
+        <where>
+            <if test="name != null  and name != ''"> and name like concat('%', #{name}, '%')</if>
+            <if test="appid != null  and appid != ''"> and appid = #{appid}</if>
+            <if test="secret != null  and secret != ''"> and secret = #{secret}</if>
+            <if test="img != null  and img != ''"> and img = #{img}</if>
+            <if test="originalId != null  and originalId != ''"> and original_id = #{originalId}</if>
+            <if test="token != null  and token != ''"> and token = #{token}</if>
+            <if test="aesKey != null  and aesKey != ''"> and aes_key = #{aesKey}</if>
+            <if test="msgDataFormat != null  and msgDataFormat != ''"> and msg_data_format = #{msgDataFormat}</if>
+            <if test="type != null "> and type = #{type}</if>
+            <if test="isDel != null "> and is_del = #{isDel}</if>
+            <if test="companyId != null "> and company_id = #{companyId}</if>
+            <if test="companyUserId != null "> and company_user_id = #{companyUserId}</if>
+            <if test="createUserId != null "> and create_user_id = #{createUserId}</if>
+            <if test="createDeptId != null "> and create_dept_id = #{createDeptId}</if>
+            <if test="isMall != null "> and is_mall = #{isMall}</if>
+            <if test="setCompanyIds != null  and setCompanyIds != ''"> and set_company_ids = #{setCompanyIds}</if>
+        </where>
+    </select>
+
+    <select id="selectFsCoursePlaySourceConfigById" parameterType="Long" resultMap="FsCoursePlaySourceConfigResult">
+        <include refid="selectFsCoursePlaySourceConfigVo"/>
+        where id = #{id}
+    </select>
+
+    <insert id="insertFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig" useGeneratedKeys="true" keyProperty="id">
+        insert into fs_course_play_source_config
+        <trim prefix="(" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">name,</if>
+            <if test="appid != null and appid != ''">appid,</if>
+            <if test="secret != null and secret != ''">secret,</if>
+            <if test="img != null">img,</if>
+            <if test="originalId != null">original_id,</if>
+            <if test="token != null and token != ''">token,</if>
+            <if test="aesKey != null and aesKey != ''">aes_key,</if>
+            <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format,</if>
+            <if test="type != null">type,</if>
+            <if test="isDel != null">is_del,</if>
+            <if test="createTime != null">create_time,</if>
+            <if test="updateTime != null">update_time,</if>
+            <if test="companyId != null">company_id,</if>
+            <if test="companyUserId != null">company_user_id,</if>
+            <if test="createUserId != null">create_user_id,</if>
+            <if test="createDeptId != null">create_dept_id,</if>
+            <if test="isMall != null">is_mall,</if>
+            <if test="setCompanyIds != null">set_company_ids,</if>
+        </trim>
+        <trim prefix="values (" suffix=")" suffixOverrides=",">
+            <if test="name != null and name != ''">#{name},</if>
+            <if test="appid != null and appid != ''">#{appid},</if>
+            <if test="secret != null and secret != ''">#{secret},</if>
+            <if test="img != null">#{img},</if>
+            <if test="originalId != null">#{originalId},</if>
+            <if test="token != null and token != ''">#{token},</if>
+            <if test="aesKey != null and aesKey != ''">#{aesKey},</if>
+            <if test="msgDataFormat != null and msgDataFormat != ''">#{msgDataFormat},</if>
+            <if test="type != null">#{type},</if>
+            <if test="isDel != null">#{isDel},</if>
+            <if test="createTime != null">#{createTime},</if>
+            <if test="updateTime != null">#{updateTime},</if>
+            <if test="companyId != null">#{companyId},</if>
+            <if test="companyUserId != null">#{companyUserId},</if>
+            <if test="createUserId != null">#{createUserId},</if>
+            <if test="createDeptId != null">#{createDeptId},</if>
+            <if test="isMall != null">#{isMall},</if>
+            <if test="setCompanyIds != null">#{setCompanyIds},</if>
+        </trim>
+    </insert>
+
+    <update id="updateFsCoursePlaySourceConfig" parameterType="FsCoursePlaySourceConfig">
+        update fs_course_play_source_config
+        <trim prefix="SET" suffixOverrides=",">
+            <if test="name != null and name != ''">name = #{name},</if>
+            <if test="appid != null and appid != ''">appid = #{appid},</if>
+            <if test="secret != null and secret != ''">secret = #{secret},</if>
+            <if test="img != null">img = #{img},</if>
+            <if test="originalId != null">original_id = #{originalId},</if>
+            <if test="token != null and token != ''">token = #{token},</if>
+            <if test="aesKey != null and aesKey != ''">aes_key = #{aesKey},</if>
+            <if test="msgDataFormat != null and msgDataFormat != ''">msg_data_format = #{msgDataFormat},</if>
+            <if test="type != null">type = #{type},</if>
+            <if test="isDel != null">is_del = #{isDel},</if>
+            <if test="createTime != null">create_time = #{createTime},</if>
+            <if test="updateTime != null">update_time = #{updateTime},</if>
+            <if test="companyId != null">company_id = #{companyId},</if>
+            <if test="companyUserId != null">company_user_id = #{companyUserId},</if>
+            <if test="createUserId != null">create_user_id = #{createUserId},</if>
+            <if test="createDeptId != null">create_dept_id = #{createDeptId},</if>
+            <if test="isMall != null">is_mall = #{isMall},</if>
+            <if test="setCompanyIds != null">set_company_ids = #{setCompanyIds},</if>
+        </trim>
+        where id = #{id}
+    </update>
+
+    <delete id="deleteFsCoursePlaySourceConfigById" parameterType="Long">
+        delete from fs_course_play_source_config where id = #{id}
+    </delete>
+
+    <delete id="deleteFsCoursePlaySourceConfigByIds" parameterType="String">
+        update from fs_course_play_source_config set is_mall=1 where id in
+        <foreach item="id" collection="array" open="(" separator="," close=")">
+            #{id}
+        </foreach>
+    </delete>
+</mapper>