fix:十二分制-奖惩规则
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.dto.store.StoreOrderTimeDTO;
|
||||
import com.cool.store.entity.StoreDO;
|
||||
import com.cool.store.mapper.StoreMapper;
|
||||
@@ -7,11 +8,12 @@ import com.cool.store.response.MiniShopsResponse;
|
||||
import com.google.common.collect.Lists;
|
||||
import org.apache.commons.collections4.CollectionUtils;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
import java.math.BigDecimal;
|
||||
import java.util.*;
|
||||
|
||||
@Repository
|
||||
public class StoreDao {
|
||||
@@ -30,6 +32,13 @@ public class StoreDao {
|
||||
return storeMapper.getByStoreId(storeId);
|
||||
}
|
||||
|
||||
public StoreDO getEffectiveByStoreId(String storeId) {
|
||||
if(StringUtils.isBlank(storeId)) {
|
||||
return null;
|
||||
}
|
||||
return storeMapper.getEffectiveByStoreId(storeId);
|
||||
}
|
||||
|
||||
public List<StoreDO> getEffectiveStoreByStoreIds(List<String> storeIdList) {
|
||||
if(CollectionUtils.isEmpty(storeIdList)) {
|
||||
return Lists.newArrayList();
|
||||
@@ -102,4 +111,39 @@ public class StoreDao {
|
||||
public List<StoreDO> getAllStoreIdAndNum(List<String> storeStatus) {
|
||||
return storeMapper.getAllStoreIdAndNum(storeStatus);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门店积分
|
||||
* @param storeId 门店id
|
||||
* @return 积分
|
||||
*/
|
||||
public BigDecimal getStoreScore(@Param("storeId") String storeId) {
|
||||
BigDecimal score = storeMapper.getStoreScore(storeId);
|
||||
if (Objects.isNull(score)) {
|
||||
return BigDecimal.valueOf(12.0);
|
||||
}
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店id查询门店映射
|
||||
* @param storeIds 门店id列表
|
||||
* @return 门店id->门店
|
||||
*/
|
||||
public Map<String, StoreDO> getStoreMapByStoreIds(List<String> storeIds) {
|
||||
if (CollectionUtils.isNotEmpty(storeIds)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<StoreDO> storeList = storeMapper.getStoreByStoreIds(storeIds);
|
||||
return CollStreamUtil.toMap(storeList, StoreDO::getStoreId, v -> v);
|
||||
}
|
||||
|
||||
/**
|
||||
* 更新门店积分
|
||||
* @param storeId 门店id
|
||||
* @param score 积分
|
||||
*/
|
||||
public boolean updateStoreScore(String storeId, BigDecimal score) {
|
||||
return storeMapper.updateStoreScore(storeId, score) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -0,0 +1,121 @@
|
||||
package com.cool.store.dao.tp;
|
||||
|
||||
import com.cool.store.entity.tp.TpApplyFormDO;
|
||||
import com.cool.store.enums.tp.TpFormStatusEnum;
|
||||
import com.cool.store.enums.tp.TpFormTypeEnum;
|
||||
import com.cool.store.mapper.tp.TpApplyFormMapper;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.util.Arrays;
|
||||
import java.util.List;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 十二分制-申请单DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/5
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class TpApplyFormDAO {
|
||||
private final TpApplyFormMapper tpApplyFormMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public boolean insertSelective(TpApplyFormDO tpApplyFormDO) {
|
||||
return tpApplyFormMapper.insertSelective(tpApplyFormDO) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
public boolean updateSelective(TpApplyFormDO tpApplyFormDO) {
|
||||
return tpApplyFormMapper.updateByPrimaryKeySelective(tpApplyFormDO) > 0;
|
||||
}
|
||||
|
||||
public boolean insertOrUpdate(TpApplyFormDO tpApplyFormDO) {
|
||||
if (Objects.isNull(tpApplyFormDO.getId())) {
|
||||
return tpApplyFormMapper.insertSelective(tpApplyFormDO) > 0;
|
||||
} else {
|
||||
return tpApplyFormMapper.updateByPrimaryKeySelective(tpApplyFormDO) > 0;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 一个月内是否存在相同加分申请
|
||||
* @param storeId 门店id
|
||||
* @param ruleId 规则id
|
||||
* @return 是否存在
|
||||
*/
|
||||
public boolean existPassRewardForm(String storeId, Long ruleId) {
|
||||
Example example = new Example(TpApplyFormDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("type", 0)
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("status", TpFormStatusEnum.PASS.getStatus())
|
||||
.andGreaterThan("approveTime", LocalDate.now().minusMonths(1));
|
||||
return tpApplyFormMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据id查询
|
||||
*/
|
||||
public TpApplyFormDO getById(Long id) {
|
||||
return tpApplyFormMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询有效记录列表
|
||||
* @param request 申请单查询Request
|
||||
* @return 申请单列表
|
||||
*/
|
||||
public List<TpApplyFormDO> getEffectiveList(TpApplyQueryRequest request) {
|
||||
return tpApplyFormMapper.getEffectiveList(request);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询门店相同规则的惩处单数量
|
||||
* @param storeId 门店id
|
||||
* @param ruleId 规则id
|
||||
* @return 数量
|
||||
*/
|
||||
public int getPenaltyCount(String storeId, Long ruleId) {
|
||||
Example example = new Example(TpApplyFormDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andIn("status", Arrays.asList(TpFormStatusEnum.PASS.getStatus(), TpFormStatusEnum.EFFECTIVE.getStatus()))
|
||||
.andNotEqualTo("type", TpFormTypeEnum.REWARD.getType());
|
||||
return tpApplyFormMapper.selectCountByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
* 是否存在待审批的申请单
|
||||
* @param storeId 门店id
|
||||
* @param ruleId 规则id
|
||||
* @param isReward 是否是加分申请
|
||||
* @return 是否存在
|
||||
*/
|
||||
public boolean existsPendingApply(String storeId, Long ruleId, boolean isReward) {
|
||||
Example example = new Example(TpApplyFormDO.class);
|
||||
Example.Criteria criteria = example.createCriteria()
|
||||
.andEqualTo("storeId", storeId)
|
||||
.andEqualTo("ruleId", ruleId)
|
||||
.andEqualTo("status", TpFormStatusEnum.PENDING.getStatus());
|
||||
if (isReward) {
|
||||
criteria.andEqualTo("type", TpFormTypeEnum.REWARD.getType());
|
||||
} else {
|
||||
criteria.andNotEqualTo("type", TpFormTypeEnum.REWARD.getType());
|
||||
}
|
||||
return tpApplyFormMapper.selectCountByExample(example) > 0;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,122 @@
|
||||
package com.cool.store.dao.tp;
|
||||
|
||||
import com.cool.store.entity.tp.TpAuditRecordDO;
|
||||
import com.cool.store.enums.ErrorCodeEnum;
|
||||
import com.cool.store.exception.ServiceException;
|
||||
import com.cool.store.mapper.tp.TpAuditRecordMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 十二分制-审批记录DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/6
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class TpAuditRecordDAO {
|
||||
private final TpAuditRecordMapper tpAuditRecordMapper;
|
||||
|
||||
/**
|
||||
* 新增提交记录
|
||||
* @param applyId 申请单id
|
||||
* @param applyType 单据类型,0加分单 1警告书 2处罚书
|
||||
* @param userId 申请人id
|
||||
* @param userName 申请人名称
|
||||
*/
|
||||
public void addSubmitRecord(Long applyId, Integer applyType, String userId, String userName) {
|
||||
Date now = new Date();
|
||||
TpAuditRecordDO recordDO = TpAuditRecordDO.builder()
|
||||
.applyType(applyType)
|
||||
.applyId(applyId)
|
||||
.recordType(1)
|
||||
.auditStatus(1)
|
||||
.handlerUserId(userId)
|
||||
.handlerUserName(userName)
|
||||
.receiveTaskTime(now)
|
||||
.finishTaskTime(now)
|
||||
.build();
|
||||
tpAuditRecordMapper.insertSelective(recordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增审批记录
|
||||
* @param applyId 申请单id
|
||||
* @param applyType 单据类型,0加分单 1警告书 2处罚书
|
||||
*/
|
||||
public void addApproveRecord(Long applyId, Integer applyType) {
|
||||
Date now = new Date();
|
||||
TpAuditRecordDO recordDO = TpAuditRecordDO.builder()
|
||||
.applyType(applyType)
|
||||
.applyId(applyId)
|
||||
.recordType(2)
|
||||
.auditStatus(0)
|
||||
.receiveTaskTime(now)
|
||||
.finishTaskTime(now)
|
||||
.build();
|
||||
tpAuditRecordMapper.insertSelective(recordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 首次发起流程
|
||||
* @param applyId 申请单id
|
||||
* @param applyType 单据类型,0加分单 1警告书 2处罚书
|
||||
* @param userId 申请人id
|
||||
* @param userName 申请人名称
|
||||
*/
|
||||
public void addRecord(Long applyId, Integer applyType, String userId, String userName) {
|
||||
addSubmitRecord(applyId, applyType, userId, userName);
|
||||
addApproveRecord(applyId, applyType);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据申请单id查询待审批记录
|
||||
* @param applyId 申请单id
|
||||
* @param applyType 单据类型,0加分单 1警告书 2处罚书
|
||||
* @return 审批记录
|
||||
*/
|
||||
public TpAuditRecordDO getPendingRecordByApplyId(Long applyId, Integer applyType) {
|
||||
TpAuditRecordDO recordDO = TpAuditRecordDO.builder()
|
||||
.applyId(applyId)
|
||||
.applyType(applyType)
|
||||
.auditStatus(0)
|
||||
.build();
|
||||
return tpAuditRecordMapper.selectOne(recordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据申请单id审批待处理的审批记录
|
||||
* @param applyId 申请单id
|
||||
* @param applyType 单据类型,0加分单 1警告书 2处罚书
|
||||
* @param userId 审批人id
|
||||
* @param userName 审批人名称
|
||||
* @param auditStatus 审批状态
|
||||
* @param remark 备注
|
||||
* @param auditTime 审批时间
|
||||
*/
|
||||
public void auditPendingRecordByApplyId(Long applyId, Integer applyType, String userId, String userName, Integer auditStatus, String remark, Date auditTime) {
|
||||
TpAuditRecordDO auditRecordDO = getPendingRecordByApplyId(applyId, applyType);
|
||||
if (Objects.isNull(auditRecordDO)) {
|
||||
throw new ServiceException(ErrorCodeEnum.TP_NOT_EXIST_PENDING_AUDIT);
|
||||
}
|
||||
auditRecordDO.setAuditStatus(auditStatus);
|
||||
auditRecordDO.setRemark(remark);
|
||||
auditRecordDO.setHandlerUserId(userId);
|
||||
auditRecordDO.setHandlerUserName(userName);
|
||||
auditRecordDO.setFinishTaskTime(auditTime);
|
||||
updateKeySelective(auditRecordDO);
|
||||
}
|
||||
|
||||
/**
|
||||
* 编辑
|
||||
*/
|
||||
public void updateKeySelective(TpAuditRecordDO recordDO) {
|
||||
tpAuditRecordMapper.updateByPrimaryKeySelective(recordDO);
|
||||
}
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cool.store.dao.tp;
|
||||
|
||||
import cn.hutool.core.collection.CollStreamUtil;
|
||||
import com.cool.store.entity.tp.TpRuleDO;
|
||||
import com.cool.store.mapper.tp.TpRuleMapper;
|
||||
import com.cool.store.request.tp.TpRuleQueryRequest;
|
||||
@@ -9,7 +10,9 @@ import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.stereotype.Repository;
|
||||
import tk.mybatis.mapper.entity.Example;
|
||||
|
||||
import java.util.Collections;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Objects;
|
||||
|
||||
/**
|
||||
|
||||
@@ -0,0 +1,27 @@
|
||||
package com.cool.store.dao.tp;
|
||||
|
||||
import com.cool.store.entity.tp.TpScoreJournalDO;
|
||||
import com.cool.store.mapper.tp.TpScoreJournalMapper;
|
||||
import lombok.RequiredArgsConstructor;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 十二分制-积分流水DAO
|
||||
* </p>
|
||||
*
|
||||
* @author wangff
|
||||
* @since 2025/11/6
|
||||
*/
|
||||
@Repository
|
||||
@RequiredArgsConstructor
|
||||
public class TpScoreJournalDAO {
|
||||
private final TpScoreJournalMapper tpScoreJournalMapper;
|
||||
|
||||
/**
|
||||
* 新增
|
||||
*/
|
||||
public void insertSelective(TpScoreJournalDO record) {
|
||||
tpScoreJournalMapper.insertSelective(record);
|
||||
}
|
||||
}
|
||||
@@ -7,6 +7,7 @@ import com.cool.store.response.MiniShopsResponse;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.List;
|
||||
|
||||
@Mapper
|
||||
@@ -14,7 +15,11 @@ public interface StoreMapper {
|
||||
|
||||
StoreDO getByStoreId(@Param("storeId") String storeId);
|
||||
|
||||
StoreDO getEffectiveByStoreId(@Param("storeId") String storeId);
|
||||
|
||||
List<StoreDO> getEffectiveStoreByStoreIds(@Param("storeIds") List<String> storeIds);
|
||||
|
||||
List<StoreDO> getStoreByStoreIds(@Param("storeIds") List<String> storeIds);
|
||||
/**
|
||||
* 根据区域Id查询所有门店(包含所有区域子节点)
|
||||
* @param regionId
|
||||
@@ -59,4 +64,18 @@ public interface StoreMapper {
|
||||
* 查询所有门店id和门店编码
|
||||
*/
|
||||
List<StoreDO> getAllStoreIdAndNum(@Param("storeStatus") List<String> storeStatus);
|
||||
|
||||
/**
|
||||
* 查询门店积分
|
||||
* @param storeId 门店id
|
||||
* @return 积分
|
||||
*/
|
||||
BigDecimal getStoreScore(@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 更新门店积分
|
||||
* @param storeId 门店id
|
||||
* @param score 积分
|
||||
*/
|
||||
int updateStoreScore(String storeId, BigDecimal score);
|
||||
}
|
||||
|
||||
@@ -1,7 +1,17 @@
|
||||
package com.cool.store.mapper.tp;
|
||||
|
||||
import com.cool.store.entity.tp.TpApplyFormDO;
|
||||
import com.cool.store.request.tp.TpApplyQueryRequest;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface TpApplyFormMapper extends Mapper<TpApplyFormDO> {
|
||||
|
||||
/**
|
||||
* 查询有效记录列表
|
||||
* @param request 申请单查询Request
|
||||
* @return 申请单列表
|
||||
*/
|
||||
List<TpApplyFormDO> getEffectiveList(TpApplyQueryRequest request);
|
||||
}
|
||||
@@ -58,6 +58,12 @@
|
||||
where store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<select id="getEffectiveByStoreId" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
where store_id = #{storeId} AND is_delete = 'effective'
|
||||
</select>
|
||||
|
||||
<select id="getEffectiveStoreByStoreIds" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
@@ -69,6 +75,18 @@
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStoreByStoreIds" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
<where>
|
||||
<if test="storeIds != null">
|
||||
<foreach collection="storeIds" item="item" separator="," open="and store_id in (" close=")">
|
||||
#{item}
|
||||
</foreach>
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="listStoreByRegionId" resultMap="BaseResultMap">
|
||||
select *
|
||||
from store_${enterpriseId}
|
||||
@@ -255,4 +273,15 @@
|
||||
</foreach>
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStoreScore" resultType="java.math.BigDecimal">
|
||||
SELECT score FROM store_extend_info_${enterpriseId}
|
||||
WHERE store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<insert id="updateStoreScore">
|
||||
INSERT INTO store_extend_info_${enterpriseId} (store_id, score) VALUES (#{storeId}, #{score})
|
||||
ON DUPLICATE KEY UPDATE
|
||||
score = values(score)
|
||||
</insert>
|
||||
</mapper>
|
||||
|
||||
@@ -17,6 +17,7 @@
|
||||
<result column="source" jdbcType="BIT" property="source" />
|
||||
<result column="approve_user_id" jdbcType="VARCHAR" property="approveUserId" />
|
||||
<result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" />
|
||||
<result column="is_draft" jdbcType="TINYINT" property="isDraft" />
|
||||
<result column="create_user_id" jdbcType="VARCHAR" property="createUserId" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
||||
|
||||
@@ -9,17 +9,22 @@
|
||||
<result column="type" jdbcType="BIT" property="type" />
|
||||
<result column="apply_no" jdbcType="VARCHAR" property="applyNo" />
|
||||
<result column="store_id" jdbcType="VARCHAR" property="storeId" />
|
||||
<result column="project_category" jdbcType="VARCHAR" property="projectCategory" />
|
||||
<result column="rule_id" jdbcType="BIGINT" property="ruleId" />
|
||||
<result column="rule_no" jdbcType="VARCHAR" property="ruleNo" />
|
||||
<result column="problem_classification" jdbcType="VARCHAR" property="problemClassification" />
|
||||
<result column="project_category" jdbcType="VARCHAR" property="projectCategory" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="is_full" jdbcType="BIT" property="isFull" />
|
||||
<result column="point" jdbcType="DECIMAL" property="point" />
|
||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="appeal_end_date" jdbcType="DATE" property="appealEndDate" />
|
||||
<result column="status" jdbcType="BIT" property="status" />
|
||||
<result column="status" jdbcType="VARCHAR" property="status" />
|
||||
<result column="pay_status" jdbcType="BIT" property="payStatus" />
|
||||
<result column="is_draft" jdbcType="BIT" property="isDraft" />
|
||||
<result column="source" jdbcType="TINYINT" property="source" />
|
||||
<result column="apply_user_id" jdbcType="VARCHAR" property="applyUserId" />
|
||||
<result column="apply_user_name" jdbcType="VARCHAR" property="applyUserName" />
|
||||
<result column="approve_user_id" jdbcType="VARCHAR" property="approveUserId" />
|
||||
<result column="approve_time" jdbcType="TIMESTAMP" property="approveTime" />
|
||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
||||
@@ -27,4 +32,49 @@
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
<result column="proof_urls" jdbcType="LONGVARCHAR" property="proofUrls" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="Base_Column_List">
|
||||
id, type, apply_no, store_id, rule_id, rule_no, problem_classification, project_category, project_name,
|
||||
is_full, score, remark, amount, appeal_end_date, status, pay_status, is_draft, source, apply_user_id,
|
||||
apply_user_name, approve_user_id, approve_time, create_time, update_time, deleted, proof_urls
|
||||
</sql>
|
||||
|
||||
<select id="getEffectiveList" parameterType="com.cool.store.request.tp.TpApplyQueryRequest" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
FROM zxjp_tp_apply_form a
|
||||
<if test="storeNameOrNum != null and storeNameOrNum != ''">
|
||||
INNER JOIN store_${enterpriseId} b ON a.store_id = b.store_id AND b.is_delete = 'effective'
|
||||
</if>
|
||||
<where>
|
||||
<if test="applyNo != null and applyNo != ''">
|
||||
AND a.apply_no LIKE CONCAT('%', #{applyNo}, '%')
|
||||
</if>
|
||||
<if test="projectCategory != null and projectCategory != ''">
|
||||
AND a.project_category = #{projectCategory}
|
||||
</if>
|
||||
<if test="ruleId != null and ruleId != ''">
|
||||
AND a.rule_id = #{ruleId}
|
||||
</if>
|
||||
<if test="status != null and status != ''">
|
||||
AND a.status = #{status}
|
||||
</if>
|
||||
<if test="type != null">
|
||||
AND a.type = #{type}
|
||||
</if>
|
||||
<if test="payStatus != null">
|
||||
AND a.pay_status = #{payStatus}
|
||||
</if>
|
||||
<if test="score != null">
|
||||
AND a.score = #{score}
|
||||
</if>
|
||||
<if test="isPenalty != null and isPenalty">
|
||||
AND a.type != 0
|
||||
</if>
|
||||
<if test="storeNameOrNum != null and storeNameOrNum != ''">
|
||||
AND (b.store_name LIKE CONCAT('%', #{storeNameOrNum}, '%')
|
||||
OR b.store_num LIKE CONCAT('%', #{storeNameOrNum}, '%')
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
</mapper>
|
||||
@@ -12,6 +12,7 @@
|
||||
<result column="audit_status" jdbcType="BIT" property="auditStatus" />
|
||||
<result column="remark" jdbcType="VARCHAR" property="remark" />
|
||||
<result column="handler_user_id" jdbcType="VARCHAR" property="handlerUserId" />
|
||||
<result column="handler_user_name" jdbcType="VARCHAR" property="handlerUserName" />
|
||||
<result column="receive_task_time" jdbcType="TIMESTAMP" property="receiveTaskTime" />
|
||||
<result column="finish_task_time" jdbcType="TIMESTAMP" property="finishTaskTime" />
|
||||
<result column="deleted" jdbcType="BIT" property="deleted" />
|
||||
|
||||
@@ -6,13 +6,13 @@
|
||||
WARNING - @mbg.generated
|
||||
-->
|
||||
<id column="id" jdbcType="BIGINT" property="id" />
|
||||
<result column="rule_code" jdbcType="VARCHAR" property="ruleCode" />
|
||||
<result column="rule_no" jdbcType="VARCHAR" property="ruleNo" />
|
||||
<result column="type" jdbcType="BIT" property="type" />
|
||||
<result column="problem_classification" jdbcType="VARCHAR" property="problemClassification" />
|
||||
<result column="project_category" jdbcType="VARCHAR" property="projectCategory" />
|
||||
<result column="project_name" jdbcType="VARCHAR" property="projectName" />
|
||||
<result column="warning_limit" jdbcType="INTEGER" property="warningLimit" />
|
||||
<result column="point" jdbcType="DECIMAL" property="point" />
|
||||
<result column="score" jdbcType="DECIMAL" property="score" />
|
||||
<result column="amount" jdbcType="DECIMAL" property="amount" />
|
||||
<result column="appeal_deadline" jdbcType="INTEGER" property="appealDeadline" />
|
||||
<result column="status" jdbcType="BIT" property="status" />
|
||||
|
||||
@@ -13,7 +13,7 @@
|
||||
<result column="join_model" jdbcType="BIT" property="joinModel" />
|
||||
<result column="store_type" jdbcType="BIT" property="storeType" />
|
||||
<result column="store_name" jdbcType="VARCHAR" property="storeName" />
|
||||
<result column="occur_score" jdbcType="DECIMAL" property="occurScore" />
|
||||
<result column="occur_score" jdbcType="VARCHAR" property="occurScore" />
|
||||
<result column="occur_date" jdbcType="DATE" property="occurDate" />
|
||||
<result column="occur_before_score" jdbcType="DECIMAL" property="occurBeforeScore" />
|
||||
<result column="occur_after_score" jdbcType="DECIMAL" property="occurAfterScore" />
|
||||
|
||||
Reference in New Issue
Block a user