待阅功能
This commit is contained in:
@ -201,4 +201,7 @@ public class NoticeReadingPO implements Serializable {
|
|||||||
@ApiModelProperty("最后一次更新时间")
|
@ApiModelProperty("最后一次更新时间")
|
||||||
private LocalDateTime lastUpdateTime;
|
private LocalDateTime lastUpdateTime;
|
||||||
|
|
||||||
|
@ApiModelProperty("功能标识:字典中包含才发送,所以要在字典中配置")
|
||||||
|
private String functionFlag;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -6,6 +6,7 @@ import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.client.Notification
|
|||||||
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingPO;
|
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingPO;
|
||||||
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingUpdateRequestBody;
|
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.entity.NoticeReadingUpdateRequestBody;
|
||||||
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.service.BizReadingService;
|
import com.chinaunicom.mall.ebtp.extend.bizshortmessageemail.service.BizReadingService;
|
||||||
|
import com.chinaunicom.mall.ebtp.extend.funcswitch.dao.BizFuncSwitchConfigMapper;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.apache.commons.lang.StringUtils;
|
import org.apache.commons.lang.StringUtils;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -25,9 +26,15 @@ public class BizReadingServiceImpl implements BizReadingService {
|
|||||||
private NotificationFeignClient notificationFeignClient;
|
private NotificationFeignClient notificationFeignClient;
|
||||||
@Autowired
|
@Autowired
|
||||||
private IBaseCacheUserService cacheUserService;
|
private IBaseCacheUserService cacheUserService;
|
||||||
|
@Autowired
|
||||||
|
private BizFuncSwitchConfigMapper funcSwitchConfigMapper;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public BaseResponse sendReading(NoticeReadingPO noticeReadingPO) {
|
public BaseResponse sendReading(NoticeReadingPO noticeReadingPO) {
|
||||||
|
String active =funcSwitchConfigMapper.getValueByKey("sendReading");
|
||||||
|
if(StringUtils.isBlank(active) || !active.contains(noticeReadingPO.getFunctionFlag())){
|
||||||
|
return BaseResponse.fail("字典中未配置此功能");
|
||||||
|
}
|
||||||
noticeReadingPO.setSendCenter("ebtp");
|
noticeReadingPO.setSendCenter("ebtp");
|
||||||
noticeReadingPO.setSendModule("biz-service-ebtp-extend");
|
noticeReadingPO.setSendModule("biz-service-ebtp-extend");
|
||||||
if(StringUtils.isBlank(noticeReadingPO.getOperatorType())){
|
if(StringUtils.isBlank(noticeReadingPO.getOperatorType())){
|
||||||
|
@ -3,10 +3,13 @@ package com.chinaunicom.mall.ebtp.extend.funcswitch.dao;
|
|||||||
|
|
||||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||||
import com.chinaunicom.mall.ebtp.extend.funcswitch.entity.BizFuncSwitchConfig;
|
import com.chinaunicom.mall.ebtp.extend.funcswitch.entity.BizFuncSwitchConfig;
|
||||||
|
import org.apache.ibatis.annotations.Param;
|
||||||
import org.springframework.stereotype.Repository;
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
@Repository
|
@Repository
|
||||||
public interface BizFuncSwitchConfigMapper extends BaseMapper<BizFuncSwitchConfig> {
|
public interface BizFuncSwitchConfigMapper extends BaseMapper<BizFuncSwitchConfig> {
|
||||||
|
|
||||||
Integer selectByType(String type);
|
Integer selectByType(String type);
|
||||||
|
|
||||||
|
String getValueByKey(@Param("key")String key);
|
||||||
}
|
}
|
||||||
|
@ -13,4 +13,9 @@
|
|||||||
resultType="java.lang.Integer">
|
resultType="java.lang.Integer">
|
||||||
SELECT active FROM biz_func_switch_config WHERE `type` = #{type}
|
SELECT active FROM biz_func_switch_config WHERE `type` = #{type}
|
||||||
</select>
|
</select>
|
||||||
|
<select id="getValueByKey" resultType="java.lang.String" >
|
||||||
|
select
|
||||||
|
value
|
||||||
|
from biz_extend_dict where `key`=#{key }
|
||||||
|
</select>
|
||||||
</mapper>
|
</mapper>
|
Reference in New Issue
Block a user