Commit 54d82eca by 墨竹

Merge remote-tracking branch 'origin/feature-02-22' into feature-02-22

parents 3cf8f453 940a11fa
package com.gic.haoban.manage.service.dao.mapper;
import java.util.Date;
import com.gic.haoban.manage.service.entity.TabHaobanFriendSetting;
import org.apache.ibatis.annotations.Param;
import org.springframework.stereotype.Repository;
import java.util.List;
/**
* 加好友配置表(TabHaobanFriendSetting)表数据库访问层
*
* @author xugaojun
* @date 2022-02-09 14:37:26
*/
@Repository
public interface TabHaobanFriendSettingMapper {
/**
* 新增数据
*
* @param tabHaobanFriendSetting 实例对象
* @return 影响行数
*/
int insert(TabHaobanFriendSetting tabHaobanFriendSetting);
/**
* 修改数据
*
* @param tabHaobanFriendSetting 实例对象
* @return 影响行数
*/
int update(TabHaobanFriendSetting tabHaobanFriendSetting);
/**
* 通过主键删除数据
*
* @param friendSettingId 主键
* @return 影响行数
*/
int deleteById(Long friendSettingId);
/**
* 通过ID查询单条数据
*
* @param friendSettingId 主键
* @return 实例对象
*/
TabHaobanFriendSetting queryById(Long friendSettingId);
/**
* 通过实体作为筛选条件查询
*
* @param tabHaobanFriendSetting 实例对象
* @return 对象列表
*/
List<TabHaobanFriendSetting> queryAll(TabHaobanFriendSetting tabHaobanFriendSetting);
/**
* 分页总数
*
* @return 对象列表
*/
int queryCountByPage();
/**
* 分页列表
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return 对象列表
*/
List<TabHaobanFriendSetting> queryListByPage(@Param("offset") int offset, @Param("limit") int limit);
}
......@@ -3,25 +3,32 @@ package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabWelcome;
import org.apache.ibatis.annotations.Mapper;
import java.util.List;
@Mapper
public interface TabHaobanWelcomeMapper {
/**
*/
int deleteByPrimaryKey(String welcomeId);
/**
*/
int insert(TabWelcome record);
/**
*/
TabWelcome selectByPrimaryKey(String welcomeId);
/**
*/
int updateByPrimaryKeySelective(TabWelcome record);
TabWelcome selectByWxEnterpriseId(String wxEnterpriseId);
/**
* desc: 根据微信企业id查询列表
*
* @param wxEnterpriseId 微信企业id
* @return : {@link List< TabWelcome>}
* @author : YongEn
* @date : 2022/2/9
*/
TabWelcome selectByWxEnterpriseId(String wxEnterpriseId);
List<TabWelcome> listByWxEnterpriseId(String wxEnterpriseId);
}
\ No newline at end of file
package com.gic.haoban.manage.service.dao.mapper;
import com.gic.haoban.manage.service.entity.TabHaobanWelcomeMedia;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* 欢迎语媒体表(TabHaobanWelcomeMedia)表数据库访问层
*
* @author xugaojun
* @since 2022-02-09 14:47:22
*/
public interface TabHaobanWelcomeMediaMapper {
/**
* 通过ID查询单条数据
*
* @param welcomeMediaId 主键
* @return 实例对象
*/
TabHaobanWelcomeMedia queryById(Long welcomeMediaId);
/**
* 查询指定行数据
*
* @param offset 查询起始位置
* @param limit 查询条数
* @return 对象列表
*/
List<TabHaobanWelcomeMedia> queryAllByLimit(@Param("offset") int offset, @Param("limit") int limit);
/**
* 通过实体作为筛选条件查询
*
* @param tabHaobanWelcomeMedia 实例对象
* @return 对象列表
*/
List<TabHaobanWelcomeMedia> queryAll(TabHaobanWelcomeMedia tabHaobanWelcomeMedia);
/**
* 新增数据
*
* @param tabHaobanWelcomeMedia 实例对象
* @return 影响行数
*/
int insert(TabHaobanWelcomeMedia tabHaobanWelcomeMedia);
/**
* 修改数据
*
* @param tabHaobanWelcomeMedia 实例对象
* @return 影响行数
*/
int update(TabHaobanWelcomeMedia tabHaobanWelcomeMedia);
/**
* 通过主键删除数据
*
* @param welcomeMediaId 主键
* @return 影响行数
*/
int deleteById(Long welcomeMediaId);
}
package com.gic.haoban.manage.service.entity;
/**
* 加好友配置表(TabHaobanFriendSetting)实体类
*
* @author xugaojun
* @date 2022-02-09 14:37:24
*/
import java.util.Date;
public class TabHaobanFriendSetting {
/**
* 加好友配置id
*/
private Long friendSettingId;
/**
* 微信企业id
*/
private String wxEnterpriseId;
/**
* 欢迎语配置类型 :
* 1 发送好办欢迎语文案+小程序卡片(附带导购参数)
* 2 发送好办欢迎语文案+公众号二维码(附带导购参数)
* 3 发送好办欢迎语文案
* 4 不发送好办欢迎语,用企微欢迎语
*/
private Integer friendSettingType;
/**
* 更新人id
*/
private String updateId;
/**
* 更新人名称
*/
private String updateName;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除0否1是
*/
private Integer deleteFlag;
public Long getFriendSettingId() {
return friendSettingId;
}
public void setFriendSettingId(Long friendSettingId) {
this.friendSettingId = friendSettingId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public Integer getFriendSettingType() {
return friendSettingType;
}
public void setFriendSettingType(Integer friendSettingType) {
this.friendSettingType = friendSettingType;
}
public String getUpdateId() {
return updateId;
}
public void setUpdateId(String updateId) {
this.updateId = updateId;
}
public String getUpdateName() {
return updateName;
}
public void setUpdateName(String updateName) {
this.updateName = updateName;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
package com.gic.haoban.manage.service.entity;
import java.io.Serializable;
import java.util.Date;
/**
* 欢迎语媒体表(TabHaobanWelcomeMedia)实体类
*
* @author xugaojun
* @since 2022-02-09 14:47:20
*/
public class TabHaobanWelcomeMedia implements Serializable {
private static final long serialVersionUID = -15936685674419727L;
/**
* 欢迎语媒体id
*/
private Long welcomeMediaId;
/**
* 微信企业id
*/
private String wxEnterpriseId;
/**
* 欢迎语id
*/
private String welcomeId;
/**
* 媒体类型 1图片 2视频 3文件
*/
private Integer mediaType;
/**
* 媒体文件路径,保存上传路径
*/
private String mediaUrl;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
/**
* 是否删除0否1是
*/
private Integer deleteFlag;
public Long getWelcomeMediaId() {
return welcomeMediaId;
}
public void setWelcomeMediaId(Long welcomeMediaId) {
this.welcomeMediaId = welcomeMediaId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWelcomeId() {
return welcomeId;
}
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
public Integer getMediaType() {
return mediaType;
}
public void setMediaType(Integer mediaType) {
this.mediaType = mediaType;
}
public String getMediaUrl() {
return mediaUrl;
}
public void setMediaUrl(String mediaUrl) {
this.mediaUrl = mediaUrl;
}
public Date getCreateTime() {
return createTime;
}
public void setCreateTime(Date createTime) {
this.createTime = createTime;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public Integer getDeleteFlag() {
return deleteFlag;
}
public void setDeleteFlag(Integer deleteFlag) {
this.deleteFlag = deleteFlag;
}
}
......@@ -48,15 +48,30 @@ public class TabWelcome implements Serializable {
private Integer statusFlag;
/**
*
* 创建时间
*/
private Date createTime;
/**
*
* 更新时间
*/
private Date updateTime;
/**
* 适用部门, 以逗号分割
*/
private String suitDepartment;
/**
* 操作人id
*/
private String operatorId;
/**
* 操作人名称
*/
private String operatorName;
public String getWelcomeId() {
return welcomeId;
}
......@@ -128,4 +143,28 @@ public class TabWelcome implements Serializable {
public void setWelcomeImg(String welcomeImg) {
this.welcomeImg = welcomeImg;
}
public String getSuitDepartment() {
return suitDepartment;
}
public void setSuitDepartment(String suitDepartment) {
this.suitDepartment = suitDepartment;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
}
\ No newline at end of file
package com.gic.haoban.manage.service.pojo.bo.welcome;
/**
* desc:加好友配置bo
*
* @author: YongEn
* @date: 2022/2/8
**/
public class FriendSettingDetailBO {
}
package com.gic.haoban.manage.service.pojo.bo.welcome;
/**
* desc:保存加好友配置bo
*
* @author: YongEn
* @date: 2022/2/8
**/
public class SaveFriendSettingBO {
}
package com.gic.haoban.manage.service.pojo.bo.welcome;
/**
* desc:保存欢迎语bo
*
* @author: YongEn
* @date: 2022/2/8
**/
public class SaveWelcomeBO {
}
package com.gic.haoban.manage.service.pojo.bo.welcome;
import java.util.List;
/**
* desc:欢迎语详情bo
*
* @author: YongEn
* @date: 2022/2/8
**/
public class WelcomeDetailBO {
/**
* 欢迎语id
*/
private String welcomeId;
/**
* 微信企业id
*/
private String wxEnterpriseId;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String welcomeContent;
/**
* 0关闭 1开启
*/
private Integer openFlag;
/**
* 适用部门, 以逗号分割
*/
private String suitDepartment;
/**
* 欢迎语媒体列表
*/
private List<WelcomeMediaBO> welcomeMediaList;
public String getWelcomeId() {
return welcomeId;
}
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getWelcomeContent() {
return welcomeContent;
}
public void setWelcomeContent(String welcomeContent) {
this.welcomeContent = welcomeContent;
}
public Integer getOpenFlag() {
return openFlag;
}
public void setOpenFlag(Integer openFlag) {
this.openFlag = openFlag;
}
public String getSuitDepartment() {
return suitDepartment;
}
public void setSuitDepartment(String suitDepartment) {
this.suitDepartment = suitDepartment;
}
public List<WelcomeMediaBO> getWelcomeMediaList() {
return welcomeMediaList;
}
public void setWelcomeMediaList(List<WelcomeMediaBO> welcomeMediaList) {
this.welcomeMediaList = welcomeMediaList;
}
@Override
public String toString() {
return "WelcomeDetailBO{" +
"welcomeId='" + welcomeId + '\'' +
", wxEnterpriseId='" + wxEnterpriseId + '\'' +
", title='" + title + '\'' +
", welcomeContent='" + welcomeContent + '\'' +
", openFlag=" + openFlag +
", suitDepartment='" + suitDepartment + '\'' +
", welcomeMediaList=" + welcomeMediaList +
'}';
}
}
package com.gic.haoban.manage.service.pojo.bo.welcome;
import java.util.Date;
import java.util.List;
/**
* desc:欢迎语列表bo
*
* @author: YongEn
* @date: 2022/2/8
**/
public class WelcomeListBO {
/**
* 欢迎语id
*/
private String welcomeId;
/**
* 微信企业id
*/
private String wxEnterpriseId;
/**
* 标题
*/
private String title;
/**
* 内容
*/
private String welcomeContent;
/**
* 0关闭 1开启
*/
private Integer openFlag;
/**
* 更新时间
*/
private Date updateTime;
/**
* 适用部门, 以逗号分割
*/
private String suitDepartment;
/**
* 操作人id
*/
private String operatorId;
/**
* 操作人名称
*/
private String operatorName;
/**
* 欢迎语媒体列表
*/
private List<WelcomeMediaBO> welcomeMediaList;
public String getWelcomeId() {
return welcomeId;
}
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getTitle() {
return title;
}
public void setTitle(String title) {
this.title = title;
}
public String getWelcomeContent() {
return welcomeContent;
}
public void setWelcomeContent(String welcomeContent) {
this.welcomeContent = welcomeContent;
}
public Integer getOpenFlag() {
return openFlag;
}
public void setOpenFlag(Integer openFlag) {
this.openFlag = openFlag;
}
public String getSuitDepartment() {
return suitDepartment;
}
public void setSuitDepartment(String suitDepartment) {
this.suitDepartment = suitDepartment;
}
public List<WelcomeMediaBO> getWelcomeMediaList() {
return welcomeMediaList;
}
public void setWelcomeMediaList(List<WelcomeMediaBO> welcomeMediaList) {
this.welcomeMediaList = welcomeMediaList;
}
public Date getUpdateTime() {
return updateTime;
}
public void setUpdateTime(Date updateTime) {
this.updateTime = updateTime;
}
public String getOperatorId() {
return operatorId;
}
public void setOperatorId(String operatorId) {
this.operatorId = operatorId;
}
public String getOperatorName() {
return operatorName;
}
public void setOperatorName(String operatorName) {
this.operatorName = operatorName;
}
@Override
public String toString() {
return "WelcomeListBO{" +
"welcomeId='" + welcomeId + '\'' +
", wxEnterpriseId='" + wxEnterpriseId + '\'' +
", title='" + title + '\'' +
", welcomeContent='" + welcomeContent + '\'' +
", openFlag=" + openFlag +
", updateTime=" + updateTime +
", suitDepartment='" + suitDepartment + '\'' +
", operatorId='" + operatorId + '\'' +
", operatorName='" + operatorName + '\'' +
", welcomeMediaList=" + welcomeMediaList +
'}';
}
}
package com.gic.haoban.manage.service.pojo.bo.welcome;
/**
* desc:欢迎语媒体bo
*
* @author: YongEn
* @date: 2022/2/9
**/
public class WelcomeMediaBO {
/**
* 欢迎语媒体id
*/
private Long welcomeMediaId;
/**
* 微信企业id
*/
private String wxEnterpriseId;
/**
* 欢迎语id
*/
private String welcomeId;
/**
* 媒体类型 1图片 2视频 3文件
*/
private Integer mediaType;
/**
* 媒体文件路径,保存上传路径
*/
private String mediaUrl;
public Long getWelcomeMediaId() {
return welcomeMediaId;
}
public void setWelcomeMediaId(Long welcomeMediaId) {
this.welcomeMediaId = welcomeMediaId;
}
public String getWxEnterpriseId() {
return wxEnterpriseId;
}
public void setWxEnterpriseId(String wxEnterpriseId) {
this.wxEnterpriseId = wxEnterpriseId;
}
public String getWelcomeId() {
return welcomeId;
}
public void setWelcomeId(String welcomeId) {
this.welcomeId = welcomeId;
}
public Integer getMediaType() {
return mediaType;
}
public void setMediaType(Integer mediaType) {
this.mediaType = mediaType;
}
public String getMediaUrl() {
return mediaUrl;
}
public void setMediaUrl(String mediaUrl) {
this.mediaUrl = mediaUrl;
}
@Override
public String toString() {
return "WelcomeMediaBO{" +
"welcomeMediaId=" + welcomeMediaId +
", wxEnterpriseId='" + wxEnterpriseId + '\'' +
", welcomeId='" + welcomeId + '\'' +
", mediaType=" + mediaType +
", mediaUrl='" + mediaUrl + '\'' +
'}';
}
}
package com.gic.haoban.manage.service.service;
import com.gic.haoban.manage.service.pojo.bo.welcome.*;
import java.util.List;
/**
* desc:欢迎语接口服务
*
* @author: YongEn
* @date: 2022/2/8
**/
public interface WelcomeService {
/**
* desc: 保存欢迎语
*
* @param bo bo
* @return : {@link Boolean}
* @author : YongEn
* @date : 2022/2/8
*/
Boolean saveWelcome(SaveWelcomeBO bo);
/**
* desc: 删除欢迎语配置
*
* @param welcomeId 欢迎语id
* @return : {@link Boolean}
* @author : YongEn
* @date : 2022/2/8
*/
Boolean removeWelcome(Long welcomeId);
/**
* desc: 获取欢迎语列表
*
* @param wxEnterpriseId 微信企业id
* @return : {@link List< WelcomeListBO >}
* @author : YongEn
* @date : 2022/2/8
*/
List<WelcomeListBO> listWelcome(String wxEnterpriseId);
/**
* desc: 获取欢迎语详情
*
* @param welcomeId 欢迎语id
* @return : {@link WelcomeDetailBO}
* @author : YongEn
* @date : 2022/2/8
*/
WelcomeDetailBO getWelcome(Long welcomeId);
/**
* desc: 保存加好友配置
*
* @param bo bo
* @return : {@link Boolean}
* @author : YongEn
* @date : 2022/2/8
*/
Boolean saveFriendSetting(SaveFriendSettingBO bo);
/**
* desc: 获取加好友配置
*
* @param wxEnterpriseId 微信企业id
* @return : {@link FriendSettingDetailBO}
* @author : YongEn
* @date : 2022/2/8
*/
FriendSettingDetailBO getFriendSetting(String wxEnterpriseId);
/**
* desc: 根据员工所在部门匹配欢迎语
*
* @param staffId 员工id
* @param wxEnterpriseId 微信企业id
* @return : {@link WelcomeDetailBO}
* @author : YongEn
* @date : 2022/2/9
*/
WelcomeDetailBO getMatchWelcomeByDept(String staffId, String wxEnterpriseId);
}
package com.gic.haoban.manage.service.service.impl;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanFriendSettingMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeMapper;
import com.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeMediaMapper;
import com.gic.haoban.manage.service.pojo.bo.welcome.*;
import com.gic.haoban.manage.service.service.WelcomeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;
/**
* desc:欢迎语接口服务实现
*
* @author: YongEn
* @date: 2022/2/9
**/
@Service
public class WelcomeServiceImpl implements WelcomeService {
@Autowired
private TabHaobanWelcomeMapper welcomeMapper;
@Autowired
private TabHaobanWelcomeMediaMapper welcomeMediaMapper;
@Autowired
private TabHaobanFriendSettingMapper friendSettingMapper;
@Override
public Boolean saveWelcome(SaveWelcomeBO bo) {
// 校验欢迎语数量
return null;
}
@Override
public Boolean removeWelcome(Long welcomeId) {
return null;
}
@Override
public List<WelcomeListBO> listWelcome(String wxEnterpriseId) {
return null;
}
@Override
public WelcomeDetailBO getWelcome(Long welcomeId) {
return null;
}
@Override
public Boolean saveFriendSetting(SaveFriendSettingBO bo) {
return null;
}
@Override
public FriendSettingDetailBO getFriendSetting(String wxEnterpriseId) {
return null;
}
@Override
public WelcomeDetailBO getMatchWelcomeByDept(String staffId, String wxEnterpriseId) {
return null;
}
}
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanFriendSettingMapper">
<resultMap type="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting" id="TabHaobanFriendSettingMap">
<result property="friendSettingId" column="friend_setting_id" jdbcType="INTEGER"/>
<result property="wxEnterpriseId" column="wx_enterprise_id" jdbcType="VARCHAR"/>
<result property="friendSettingType" column="friend_setting_type" jdbcType="INTEGER"/>
<result property="updateId" column="update_id" jdbcType="VARCHAR"/>
<result property="updateName" column="update_name" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="delete_flag" jdbcType="INTEGER"/>
</resultMap>
<sql id="Base_Column_List">
friend_setting_id
, wx_enterprise_id, friend_setting_type, update_id, update_name, create_time, update_time, delete_flag </sql>
<!--新增所有列-->
<insert id="insert" keyProperty="friendSettingId" useGeneratedKeys="true"
parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting">
INSERT INTO tab_haoban_friend_setting
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="friendSettingId != null">
friend_setting_id,
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id,
</if>
<if test="friendSettingType != null">
friend_setting_type,
</if>
<if test="updateId != null and updateId != ''">
update_id,
</if>
<if test="updateName != null and updateName != ''">
update_name,
</if>
<if test="createTime != null">
create_time,
</if>
<if test="updateTime != null">
update_time,
</if>
<if test="deleteFlag != null">
delete_flag,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="friendSettingId != null">
#{friendSettingId},
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
#{wxEnterpriseId},
</if>
<if test="friendSettingType != null">
#{friendSettingType},
</if>
<if test="updateId != null and updateId != ''">
#{updateId},
</if>
<if test="updateName != null and updateName != ''">
#{updateName},
</if>
<if test="createTime != null">
#{createTime},
</if>
<if test="updateTime != null">
#{updateTime},
</if>
<if test="deleteFlag != null">
#{deleteFlag},
</if>
</trim>
</insert>
<!--通过主键修改数据-->
<update id="update" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting">
update tab_haoban_friend_setting
<set>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if test="friendSettingType != null">
friend_setting_type = #{friendSettingType},
</if>
<if test="updateId != null and updateId != ''">
update_id = #{updateId},
</if>
<if test="updateName != null and updateName != ''">
update_name = #{updateName},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag},
</if>
</set>
where friend_setting_id = #{friendSettingId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</delete>
<!--查询单个-->
<select id="queryById" resultMap="TabHaobanFriendSettingMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_friend_setting
where friend_setting_id = #{friendSettingId}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" parameterType="com.gic.haoban.manage.service.entity.TabHaobanFriendSetting"
resultMap="TabHaobanFriendSettingMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_friend_setting
<where>
<if test="friendSettingId != null">
and friend_setting_id = #{friendSettingId}
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if test="friendSettingType != null">
and friend_setting_type = #{friendSettingType}
</if>
<if test="updateId != null and updateId != ''">
and update_id = #{updateId}
</if>
<if test="updateName != null and updateName != ''">
and update_name = #{updateName}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="deleteFlag != null">
and delete_flag = #{deleteFlag}
</if>
</where>
</select>
<select id="queryCountByPage" resultType="int">
select count(*)
from tab_haoban_friend_setting
</select>
<select id="queryListByPage" resultMap="TabHaobanFriendSettingMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_friend_setting
limit #{offset}, #{limit}
</select>
</mapper>
......@@ -11,10 +11,14 @@
<result column="open_flag" jdbcType="INTEGER" property="openFlag"/>
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
<result column="suit_department" jdbcType="VARCHAR" property="suitDepartment"/>
<result column="operator_id" jdbcType="VARCHAR" property="operatorId"/>
<result column="operator_name" jdbcType="VARCHAR" property="operatorName"/>
</resultMap>
<sql id="Base_Column_List">
welcome_id, wx_enterprise_id, title, welcome_content,welcome_img,open_flag, status_flag, create_time, update_time
welcome_id, wx_enterprise_id, title, welcome_content,welcome_img,open_flag, status_flag,
create_time, update_time, suit_department, operator_id, operator_name
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
......@@ -33,11 +37,20 @@
<insert id="insert" parameterType="com.gic.haoban.manage.service.entity.TabWelcome">
insert into tab_haoban_welcome (welcome_id, wx_enterprise_id, title,
welcome_content, welcome_img, open_flag, status_flag, create_time,
update_time)
values (#{welcomeId,jdbcType=VARCHAR}, #{wxEnterpriseId,jdbcType=VARCHAR}, #{title,jdbcType=VARCHAR},
#{welcomeContent,jdbcType=VARCHAR}, #{welcomeImg}, #{openFlag},
#{statusFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP})
update_time, suit_department, operator_id, operator_name)
values (#{welcomeId,jdbcType=VARCHAR},
#{wxEnterpriseId,jdbcType=VARCHAR},
#{title,jdbcType=VARCHAR},
#{welcomeContent,jdbcType=VARCHAR},
#{welcomeImg},
#{openFlag},
#{statusFlag,jdbcType=INTEGER},
#{createTime,jdbcType=TIMESTAMP},
#{updateTime,jdbcType=TIMESTAMP},
#{suitDepartment,jdbcType=VARCHAR},
#{operatorId,jdbcType=VARCHAR},
#{operatorName,jdbcType=VARCHAR}
)
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.gic.haoban.manage.service.entity.TabWelcome">
......@@ -67,6 +80,15 @@
<if test="updateTime != null">
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if test="suitDepartment != null">
suit_department = #{suitDepartment,jdbcType=TIMESTAMP},
</if>
<if test="operatorId != null">
operator_id = #{operatorId,jdbcType=TIMESTAMP},
</if>
<if test="operatorName != null">
operator_name = #{operatorName,jdbcType=TIMESTAMP},
</if>
</set>
where welcome_id = #{welcomeId,jdbcType=VARCHAR}
</update>
......@@ -78,4 +100,13 @@
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
<select id="listByWxEnterpriseId" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List"/>
from tab_haoban_welcome
where wx_enterprise_id = #{wxEnterpriseId,jdbcType=VARCHAR}
and status_flag=1
</select>
</mapper>
\ No newline at end of file
<?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.gic.haoban.manage.service.dao.mapper.TabHaobanWelcomeMediaMapper">
<resultMap type="com.gic.haoban.manage.service.entity.TabHaobanWelcomeMedia" id="TabHaobanWelcomeMediaMap">
<result property="welcomeMediaId" column="welcome_media_id" jdbcType="INTEGER"/>
<result property="wxEnterpriseId" column="wx_enterprise_id" jdbcType="VARCHAR"/>
<result property="welcomeId" column="welcome_id" jdbcType="VARCHAR"/>
<result property="mediaType" column="media_type" jdbcType="INTEGER"/>
<result property="mediaUrl" column="media_url" jdbcType="VARCHAR"/>
<result property="createTime" column="create_time" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="update_time" jdbcType="TIMESTAMP"/>
<result property="deleteFlag" column="delete_flag" jdbcType="INTEGER"/>
</resultMap>
<!--查询单个-->
<select id="queryById" resultMap="TabHaobanWelcomeMediaMap">
select
welcome_media_id, wx_enterprise_id, welcome_id, media_type, media_url, create_time, update_time, delete_flag
from haoban3.tab_haoban_welcome_media
where welcome_media_id = #{welcomeMediaId}
</select>
<!--查询指定行数据-->
<select id="queryAllByLimit" resultMap="TabHaobanWelcomeMediaMap">
select
welcome_media_id, wx_enterprise_id, welcome_id, media_type, media_url, create_time, update_time, delete_flag
from haoban3.tab_haoban_welcome_media
limit #{offset}, #{limit}
</select>
<!--通过实体作为筛选条件查询-->
<select id="queryAll" resultMap="TabHaobanWelcomeMediaMap">
select
welcome_media_id, wx_enterprise_id, welcome_id, media_type, media_url, create_time, update_time, delete_flag
from haoban3.tab_haoban_welcome_media
<where>
<if test="welcomeMediaId != null">
and welcome_media_id = #{welcomeMediaId}
</if>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
and wx_enterprise_id = #{wxEnterpriseId}
</if>
<if test="welcomeId != null and welcomeId != ''">
and welcome_id = #{welcomeId}
</if>
<if test="mediaType != null">
and media_type = #{mediaType}
</if>
<if test="mediaUrl != null and mediaUrl != ''">
and media_url = #{mediaUrl}
</if>
<if test="createTime != null">
and create_time = #{createTime}
</if>
<if test="updateTime != null">
and update_time = #{updateTime}
</if>
<if test="deleteFlag != null">
and delete_flag = #{deleteFlag}
</if>
</where>
</select>
<!--新增所有列-->
<insert id="insert" keyProperty="welcomeMediaId" useGeneratedKeys="true">
insert into haoban3.tab_haoban_welcome_media(wx_enterprise_id, welcome_id, media_type, media_url, create_time, update_time, delete_flag)
values (#{wxEnterpriseId}, #{welcomeId}, #{mediaType}, #{mediaUrl}, #{createTime}, #{updateTime}, #{deleteFlag})
</insert>
<!--通过主键修改数据-->
<update id="update">
update haoban3.tab_haoban_welcome_media
<set>
<if test="wxEnterpriseId != null and wxEnterpriseId != ''">
wx_enterprise_id = #{wxEnterpriseId},
</if>
<if test="welcomeId != null and welcomeId != ''">
welcome_id = #{welcomeId},
</if>
<if test="mediaType != null">
media_type = #{mediaType},
</if>
<if test="mediaUrl != null and mediaUrl != ''">
media_url = #{mediaUrl},
</if>
<if test="createTime != null">
create_time = #{createTime},
</if>
<if test="updateTime != null">
update_time = #{updateTime},
</if>
<if test="deleteFlag != null">
delete_flag = #{deleteFlag},
</if>
</set>
where welcome_media_id = #{welcomeMediaId}
</update>
<!--通过主键删除-->
<delete id="deleteById">
delete from haoban3.tab_haoban_welcome_media where welcome_media_id = #{welcomeMediaId}
</delete>
</mapper>
package com.gic.haoban.manage.web.controller;
import com.gic.commons.webapi.reponse.RestResponse;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
/**
* desc:欢迎语controller
*
* @author: YongEn
* @date: 2022/2/8
**/
@RestController
@RequestMapping("/welcome")
public class WelcomeController extends WebBaseController {
@RequestMapping(value = "/save", method = RequestMethod.POST)
public RestResponse<Boolean> saveWelcome() {
// 保存欢迎语
return null;
}
public RestResponse removeWelcome() {
// 删除欢迎语
return null;
}
public RestResponse listWelcome() {
// 查询欢迎语列表
return null;
}
public RestResponse getWelcome() {
// 获取欢迎语
return null;
}
public RestResponse saveFriendSetting() {
// 保存加好友配置
return null;
}
public RestResponse getFriendSetting() {
// 获取加好友配置
return null;
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment