Merge #31 into master from cc_2021104_twelve_points
十二分
* cc_2021104_twelve_points: (34 commits squashed)
- fix:启用禁用规则合并
- Merge branch 'refs/heads/master' into cc_2021104_twelve_points
- fix:惩处规则列表新增描述字段
- fix:新增用户管辖门店列表接口
- fix:门店列表接口新增门店积分字段
- fix:查询问题修复;新增草稿状态
- fix:申请单审批补充审批人字段
- fix:修改门店积分限制0-12
- fix:积分流水接口修复;申请单查询接口添加日期筛选
- fix:惩处单查询提供惩处待处理、惩处已处理状态筛选
- fix:惩处单复议申请查询异常修复
- fix:小程序惩处单详情接口字段补充
- fix:查询字段补充
- fix
- fix:转义
- fix
- fix:新增撤销复议申请单接口
- fix:补充字段
- fix:补充字段
- fix:新增门店分数接口
- fix:申请单新增筛选条件
- fix:门店积分接口返回参数修改
- fix:小程序规则分页查询接口改为Post
- fix:问题修复
- fix:十二分导入
- fix:导入状态部分失败改为失败
- fix:字段补充
- fix:异步下Excel导入图片临时文件被清理的问题
- fix:扣分申请导入图片路径修改并使用CDN
- fix:导入图片上传oss文件类型修改为图片
- fix:批量审批
- fix:批量审批新增备注字段
- fix:字段补充
- Merge branch 'master' into cc_2021104_twelve_points
# Conflicts:
#	coolstore-partner-common/src/main/java/com/cool/store/constants/RedisConstant.java
#	coolstore-partner-common/src/main/java/com/cool/store/enums/ErrorCodeEnum.java
#	coolstore-partner-dao/src/main/java/com/cool/store/dao/StoreDao.java
#	coolstore-partner-dao/src/main/java/com/cool/store/mapper/StoreMapper.java
#	coolstore-partner-dao/src/main/resources/mapper/StoreMapper.xml
#	coolstore-partner-web/src/main/java/com/cool/store/controller/webb/PCStoreController.java
Signed-off-by: 王非凡 <accounts_67eba0c5fee9c49c80c8e2b4@mail.teambition.com>
Reviewed-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
Merged-by: 正新 <accounts_6964c7bcd2a2c377c5bbd01b@mail.teambition.com>
CR-link: https://codeup.aliyun.com/692ea314dec569489f6f167c/hangzhou/java/custom_zxjp/change/31
This commit is contained in:
@@ -131,6 +131,19 @@ public class StoreDao {
|
||||
return score;
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店id查询门店编码
|
||||
* @param storeIds 门店id列表
|
||||
* @return store_id -> score
|
||||
*/
|
||||
public Map<String, BigDecimal> getScoreByStoreIds(List<String> storeIds) {
|
||||
if (CollectionUtils.isEmpty(storeIds)) {
|
||||
return Collections.emptyMap();
|
||||
}
|
||||
List<Map<String, Object>> list = storeMapper.getScoreByStoreIds(storeIds);
|
||||
return CollStreamUtil.toMap(list, v -> MapUtils.getString(v, "storeId"), v -> BigDecimal.valueOf(MapUtils.getDouble(v, "score")));
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据门店id查询门店映射
|
||||
* @param storeIds 门店id列表
|
||||
@@ -211,4 +224,14 @@ public class StoreDao {
|
||||
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据区域id查询门店列表
|
||||
* @param regionIds 区域id
|
||||
* @param keyword 门店名称或门店编码
|
||||
* @return 门店列表
|
||||
*/
|
||||
public List<StoreDO> getStoreByRegionIds(List<String> regionIds, String keyword) {
|
||||
return storeMapper.getStoreByRegionIds(regionIds, keyword);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -134,7 +134,12 @@ public class TpApplyFormDAO {
|
||||
* @return 申请单
|
||||
*/
|
||||
public TpApplyFormDO getAppealByPenaltyId(Long penaltyId) {
|
||||
return tpApplyFormMapper.selectOne(TpApplyFormDO.builder().penaltyId(penaltyId).deleted(0).build());
|
||||
Example example = new Example(TpApplyFormDO.class);
|
||||
example.createCriteria()
|
||||
.andEqualTo("penaltyId", penaltyId)
|
||||
.andEqualTo("deleted", 0)
|
||||
.andIn("status", Arrays.asList(TpFormStatusEnum.PENDING.getStatus(), TpFormStatusEnum.PASS.getStatus(), TpFormStatusEnum.EFFECTIVE.getStatus()));
|
||||
return tpApplyFormMapper.selectOneByExample(example);
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
@@ -61,6 +61,13 @@ public class TpRuleDAO {
|
||||
return tpRuleMapper.selectByPrimaryKey(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据规则编码查询启用的规则
|
||||
*/
|
||||
public TpRuleDO getEnableByCode(String ruleNo) {
|
||||
return tpRuleMapper.selectOne(TpRuleDO.builder().ruleNo(ruleNo).status(1).deleted(0).build());
|
||||
}
|
||||
|
||||
public List<TpRuleDO> getEffectiveList(TpRuleQueryRequest request) {
|
||||
Example example = new Example(TpRuleDO.class);
|
||||
Example.Criteria criteria = example.createCriteria();
|
||||
|
||||
@@ -75,6 +75,13 @@ public interface StoreMapper {
|
||||
*/
|
||||
BigDecimal getStoreScore(@Param("storeId") String storeId);
|
||||
|
||||
/**
|
||||
* 根据门店id查询门店编码
|
||||
* @param storeIds 门店id列表
|
||||
* @return store_id -> score
|
||||
*/
|
||||
List<Map<String, Object>> getScoreByStoreIds(@Param("storeIds") List<String> storeIds);
|
||||
|
||||
/**
|
||||
* 更新门店积分
|
||||
* @param storeId 门店id
|
||||
@@ -131,4 +138,12 @@ public interface StoreMapper {
|
||||
@Param("city") String city,
|
||||
@Param("openStartTime") LocalDate openStartTime,
|
||||
@Param("openEndTime") LocalDate openEndTime);
|
||||
|
||||
/**
|
||||
* 根据区域id查询门店列表
|
||||
* @param regionIds 区域id
|
||||
* @param keyword 门店名称或门店编码
|
||||
* @return 门店列表
|
||||
*/
|
||||
List<StoreDO> getStoreByRegionIds(@Param("regionIds") List<String> regionIds, @Param("keyword") String keyword);
|
||||
}
|
||||
|
||||
@@ -281,6 +281,14 @@
|
||||
WHERE store_id = #{storeId}
|
||||
</select>
|
||||
|
||||
<select id="getScoreByStoreIds" resultType="java.util.Map">
|
||||
SELECT store_id storeId, score FROM store_extend_info_${enterpriseId}
|
||||
WHERE store_id IN
|
||||
<foreach item="storeId" collection="storeIds" separator="," open="(" close=")">
|
||||
#{storeId}
|
||||
</foreach>
|
||||
</select>
|
||||
|
||||
<insert id="updateStoreScore">
|
||||
INSERT INTO store_extend_info_${enterpriseId} (store_id, score) VALUES (#{storeId}, #{score})
|
||||
ON DUPLICATE KEY UPDATE
|
||||
@@ -355,4 +363,21 @@
|
||||
AND open_time <= #{openEndTime}
|
||||
</if>
|
||||
</select>
|
||||
|
||||
<select id="getStoreByRegionIds" resultMap="BaseResultMap">
|
||||
SELECT * FROM store_${enterpriseId}
|
||||
<where>
|
||||
is_delete = 'effective' AND store_status != 'closed'
|
||||
<if test="keyword != null and keyword != ''">
|
||||
AND (store_name LIKE concat('%', #{keyword}, '%') OR store_num LIKE concat('%', #{keyword}, '%'))
|
||||
</if>
|
||||
<if test="regionIds != null and !regionIds.isEmpty()">
|
||||
AND (
|
||||
<foreach collection="regionIds" item="regionId" separator=" OR ">
|
||||
region_path LIKE concat('%/', #{regionId}, '/%')
|
||||
</foreach>
|
||||
)
|
||||
</if>
|
||||
</where>
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
@@ -45,8 +45,15 @@
|
||||
penalty_id, applicant_name, phone, appeal_reason, appeal_detail_reason
|
||||
</sql>
|
||||
|
||||
<sql id="Base_Column_List_A">
|
||||
a.id,a.type,a.apply_no,a.store_id,a.rule_id,a.rule_no,a.problem_classification,a.project_category,
|
||||
a.project_name,a.is_full,a.score,a.remark,a.amount,a.appeal_end_date,a.status,a.pay_status,a.is_draft,
|
||||
a.source,a.apply_user_id,a.apply_user_name,a.approve_user_id,a.approve_time,a.create_time,a.update_time,
|
||||
a.deleted,a.proof_urls,a.penalty_id,a.applicant_name,a.phone,a.appeal_reason,a.appeal_detail_reason
|
||||
</sql>
|
||||
|
||||
<select id="getEffectiveList" parameterType="com.cool.store.request.tp.TpApplyQueryRequest" resultMap="BaseResultMap">
|
||||
SELECT <include refid="Base_Column_List" />
|
||||
SELECT <include refid="Base_Column_List_A" />
|
||||
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'
|
||||
@@ -82,7 +89,7 @@
|
||||
</if>
|
||||
<if test="storeNameOrNum != null and storeNameOrNum != ''">
|
||||
AND (b.store_name LIKE CONCAT('%', #{storeNameOrNum}, '%')
|
||||
OR b.store_num LIKE CONCAT('%', #{storeNameOrNum}, '%')
|
||||
OR b.store_num LIKE CONCAT('%', #{storeNameOrNum}, '%'))
|
||||
</if>
|
||||
<if test="appealReason != null and appealReason != ''">
|
||||
AND a.appeal_reason LIKE CONCAT('%', #{appealReason}, '%')
|
||||
@@ -93,6 +100,21 @@
|
||||
<if test="overdue != null and overdue">
|
||||
AND a.appeal_end_date < CURRENT_DATE
|
||||
</if>
|
||||
<if test="startTime != null">
|
||||
AND a.create_time >= #{startTime}
|
||||
</if>
|
||||
<if test="endTime != null">
|
||||
AND a.create_time <= #{endTime}
|
||||
</if>
|
||||
<if test="penaltyStatus != null and penaltyStatus == 1">
|
||||
AND a.status = 'pass' AND (a.pay_status = 0 OR a.pay_status = 1)
|
||||
</if>
|
||||
<if test="penaltyStatus != null and penaltyStatus == 2">
|
||||
AND (a.status = 'effective' AND (a.pay_status = 0 OR a.pay_status = 2) OR a.status = 'cancel')
|
||||
</if>
|
||||
<if test="storeId != null and storeId != ''">
|
||||
AND a.store_id = #{storeId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY a.create_time DESC
|
||||
</select>
|
||||
|
||||
Reference in New Issue
Block a user