feat:事项配置
This commit is contained in:
@@ -0,0 +1,54 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import com.cool.store.entity.MatterConfigDO;
|
||||
import com.cool.store.mapper.MatterConfigMapper;
|
||||
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* @Author suzhuhong
|
||||
* @Date 2025/7/24 14:22
|
||||
* @Version 1.0
|
||||
*/
|
||||
@Slf4j
|
||||
@Repository
|
||||
public class MatterConfigDAO {
|
||||
|
||||
@Resource
|
||||
MatterConfigMapper matterConfigMapper;
|
||||
|
||||
public int insert(MatterConfigDO matterConfigDO){
|
||||
return matterConfigMapper.insertSelective(matterConfigDO);
|
||||
}
|
||||
|
||||
public int update(MatterConfigDO matterConfigDO){
|
||||
return matterConfigMapper.updateByPrimaryKeySelective(matterConfigDO);
|
||||
}
|
||||
|
||||
public MatterConfigDO getById(Long id){
|
||||
return matterConfigMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
public int updateForce(MatterConfigDO matterConfigDO){
|
||||
return matterConfigMapper.updateForce(matterConfigDO);
|
||||
}
|
||||
|
||||
public int batchDelete(List<Long> ids, String userId){
|
||||
if (CollectionUtils.isEmpty(ids)){
|
||||
return 0;
|
||||
}
|
||||
return matterConfigMapper.updateDeleteStatus(ids,userId);
|
||||
}
|
||||
|
||||
public List<MatterConfigDO> ListByCondition(MatterConfigQueryRequest request){
|
||||
return matterConfigMapper.ListByCondition(request);
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.MatterConfigDO;
|
||||
import com.cool.store.request.notice.MatterConfigQueryRequest;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface MatterConfigMapper extends Mapper<MatterConfigDO> {
|
||||
|
||||
|
||||
/**
|
||||
* 强制修改
|
||||
* @param matterConfigDO
|
||||
* @return
|
||||
*/
|
||||
int updateForce(@Param("matterConfigDO") MatterConfigDO matterConfigDO);
|
||||
|
||||
/**
|
||||
* 批量修改删除状态
|
||||
*/
|
||||
int updateDeleteStatus(@Param("ids") List<Long> ids, @Param("userId") String userId);
|
||||
|
||||
|
||||
/**
|
||||
* 条件查询
|
||||
* @param request
|
||||
* @return
|
||||
*/
|
||||
List<MatterConfigDO> ListByCondition(@Param("request") MatterConfigQueryRequest request);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.MessageTemplateDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface MessageTemplateMapper extends Mapper<MessageTemplateDO> {
|
||||
}
|
||||
@@ -0,0 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.StoreMessageDO;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
public interface StoreMessageMapper extends Mapper<StoreMessageDO> {
|
||||
}
|
||||
@@ -0,0 +1,78 @@
|
||||
<?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.cool.store.mapper.MatterConfigMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.MatterConfigDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="module_code" jdbcType="TINYINT" property="moduleCode" />
|
||||
<result column="matter_type" jdbcType="TINYINT" property="matterType" />
|
||||
<result column="system_source" jdbcType="VARCHAR" property="systemSource" />
|
||||
<result column="jump_type" jdbcType="BIT" property="jumpType" />
|
||||
<result column="jump_url" jdbcType="VARCHAR" property="jumpUrl" />
|
||||
<result column="status" jdbcType="BIT" property="status" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="update_user_id" jdbcType="VARCHAR" property="updateUserId" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="default_handle_person_info" jdbcType="LONGVARCHAR" property="defaultHandlePersonInfo" />
|
||||
<result column="default_store_info" jdbcType="LONGVARCHAR" property="defaultStoreInfo" />
|
||||
</resultMap>
|
||||
|
||||
<update id="updateForce" parameterType="com.cool.store.entity.MatterConfigDO">
|
||||
UPDATE zxjp_matter_config
|
||||
SET
|
||||
module_code = #{matterConfigDO.moduleCode,jdbcType=TINYINT},
|
||||
matter_type = #{matterConfigDO.matterType,jdbcType=TINYINT},
|
||||
system_source = #{matterConfigDO.systemSource,jdbcType=VARCHAR},
|
||||
jump_type = #{matterConfigDO.jumpType,jdbcType=BIT},
|
||||
jump_url = #{matterConfigDO.jumpUrl,jdbcType=VARCHAR},
|
||||
status = #{matterConfigDO.status,jdbcType=BIT},
|
||||
remark = #{matterConfigDO.remark,jdbcType=VARCHAR},
|
||||
update_time = now(),
|
||||
update_user_id = #{matterConfigDO.updateUserId,jdbcType=VARCHAR},
|
||||
default_handle_person_info = #{matterConfigDO.defaultHandlePersonInfo,jdbcType=LONGVARCHAR},
|
||||
default_store_info = #{matterConfigDO.defaultStoreInfo,jdbcType=LONGVARCHAR}
|
||||
WHERE id = #{matterConfigDO.id,jdbcType=BIGINT}
|
||||
</update>
|
||||
|
||||
|
||||
<update id="updateDeleteStatus" parameterType="map">
|
||||
UPDATE zxjp_matter_config
|
||||
SET
|
||||
deleted = 1,
|
||||
update_time = now(),
|
||||
update_user_id = #{userId,jdbcType=VARCHAR}
|
||||
WHERE id IN
|
||||
<foreach collection="ids" item="id" open="(" separator="," close=")">
|
||||
#{id,jdbcType=BIGINT}
|
||||
</foreach>
|
||||
</update>
|
||||
|
||||
|
||||
<select id="ListByCondition" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
*
|
||||
FROM zxjp_matter_config
|
||||
WHERE deleted = 0
|
||||
<if test="request.moduleCode != null">
|
||||
AND module_code = #{request.moduleCode,jdbcType=TINYINT}
|
||||
</if>
|
||||
<if test="request.matterType != null">
|
||||
AND matter_type = #{request.matterType,jdbcType=TINYINT}
|
||||
</if>
|
||||
<if test="request.systemSource != null and request.systemSource != ''">
|
||||
AND system_source = #{request.systemSource,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="request.status != null">
|
||||
AND status = #{request.status,jdbcType=BIT}
|
||||
</if>
|
||||
ORDER BY create_time DESC
|
||||
</select>
|
||||
|
||||
|
||||
|
||||
</mapper>
|
||||
@@ -0,0 +1,33 @@
|
||||
<?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.cool.store.mapper.MessageTemplateMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.MessageTemplateDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="message_code" jdbcType="VARCHAR" property="messageCode" />
|
||||
<result column="module_code" jdbcType="TINYINT" property="moduleCode" />
|
||||
<result column="matter_type" jdbcType="TINYINT" property="matterType" />
|
||||
<result column="message_title" jdbcType="VARCHAR" property="messageTitle" />
|
||||
<result column="system_source" jdbcType="VARCHAR" property="systemSource" />
|
||||
<result column="process_type" jdbcType="TINYINT" property="processType" />
|
||||
<result column="remind_type" jdbcType="TINYINT" property="remindType" />
|
||||
<result column="remind_start_time" jdbcType="TIMESTAMP" property="remindStartTime" />
|
||||
<result column="remind_end_time" jdbcType="TIMESTAMP" property="remindEndTime" />
|
||||
<result column="deadline" jdbcType="TIMESTAMP" property="deadline" />
|
||||
<result column="today_task" jdbcType="BIT" property="todayTask" />
|
||||
<result column="message_image" jdbcType="VARCHAR" property="messageImage" />
|
||||
<result column="publish_status" jdbcType="BIT" property="publishStatus" />
|
||||
<result column="publish_time" jdbcType="TIMESTAMP" property="publishTime" />
|
||||
<result column="publisher_user_id" jdbcType="BIGINT" property="publisherUserId" />
|
||||
<result column="create_user_id" jdbcType="BIGINT" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="updater_user_id" jdbcType="BIGINT" property="updaterUserId" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="message_content" jdbcType="LONGVARCHAR" property="messageContent" />
|
||||
<result column="handle_person_info" jdbcType="LONGVARCHAR" property="handlePersonInfo" />
|
||||
<result column="store_info" jdbcType="LONGVARCHAR" property="storeInfo" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
@@ -0,0 +1,27 @@
|
||||
<?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.cool.store.mapper.StoreMessageMapper">
|
||||
<resultMap id="BaseResultMap" type="com.cool.store.entity.StoreMessageDO">
|
||||
<!--
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="store_code" jdbcType="VARCHAR" property="storeCode" />
|
||||
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
|
||||
<result column="message_template_id" jdbcType="BIGINT" property="messageTemplateId" />
|
||||
<result column="read_status" jdbcType="BIT" property="readStatus" />
|
||||
<result column="read_time" jdbcType="TIMESTAMP" property="readTime" />
|
||||
<result column="process_status" jdbcType="TINYINT" property="processStatus" />
|
||||
<result column="process_time" jdbcType="TIMESTAMP" property="processTime" />
|
||||
<result column="actual_operator_id" jdbcType="BIGINT" property="actualOperatorId" />
|
||||
<result column="actual_operator_name" jdbcType="VARCHAR" property="actualOperatorName" />
|
||||
<result column="revoke_status" jdbcType="BIT" property="revokeStatus" />
|
||||
<result column="revoke_time" jdbcType="TIMESTAMP" property="revokeTime" />
|
||||
<result column="revoke_operator_id" jdbcType="BIGINT" property="revokeOperatorId" />
|
||||
<result column="revoke_operator_name" jdbcType="VARCHAR" property="revokeOperatorName" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
<result column="operator_list" jdbcType="LONGVARCHAR" property="operatorList" />
|
||||
</resultMap>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user