Merge branch 'uat' into 'master'
20220422发版 See merge request eshop/biz_service_ebtp_extend!82
This commit is contained in:
@ -13,7 +13,7 @@ public interface BizMessageMapper extends BaseMapper<BizMessage> {
|
|||||||
|
|
||||||
IPage<BizMessage> findMessage(@Param("param") IPage<BizMessage> page, @Param("userId") String userId);
|
IPage<BizMessage> findMessage(@Param("param") IPage<BizMessage> page, @Param("userId") String userId);
|
||||||
|
|
||||||
IPage<BizMessageVo> findMessageVo(@Param("param") IPage<BizMessageVo> page, @Param("userId") String userId);
|
IPage<BizMessageVo> findMessageVo(@Param("param") IPage<BizMessageVo> page, @Param("userId") String userId,@Param("templatecodes") List<String> templatecodes);
|
||||||
|
|
||||||
Boolean updateState(@Param("userId") String userId,@Param("messageId") String messageId);
|
Boolean updateState(@Param("userId") String userId,@Param("messageId") String messageId);
|
||||||
|
|
||||||
|
@ -23,16 +23,30 @@
|
|||||||
FROM biz_message
|
FROM biz_message
|
||||||
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
||||||
WHERE authorize = 0
|
WHERE authorize = 0
|
||||||
|
<if test="templatecodes!=null and templatecodes.size()>0 ">
|
||||||
|
and biz_message.templatecode in
|
||||||
|
<foreach item="item" collection="templatecodes" separator="," open="(" close=")" index="">
|
||||||
|
#{item, jdbcType=NUMERIC}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
<if test="userId!=null and userId!=''">
|
<if test="userId!=null and userId!=''">
|
||||||
UNION ALL
|
UNION ALL
|
||||||
SELECT a.*,IFNULL(b.state,1) as authorizestate
|
SELECT a.*,IFNULL(b.state,1) as authorizestate
|
||||||
FROM ( SELECT biz_message.*,biz_message_template.type as templatetype
|
FROM ( SELECT biz_message.*,biz_message_template.type as templatetype
|
||||||
FROM biz_message
|
FROM biz_message
|
||||||
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
left join biz_message_template on biz_message.templatecode = biz_message_template.code
|
||||||
WHERE authorize = 1) a
|
WHERE authorize = 1
|
||||||
|
<if test="templatecodes!=null and templatecodes.size()>0 ">
|
||||||
|
and biz_message.templatecode in
|
||||||
|
<foreach item="item" collection="templatecodes" separator="," open="(" close=")" index="">
|
||||||
|
#{item, jdbcType=NUMERIC}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
) a
|
||||||
INNER JOIN
|
INNER JOIN
|
||||||
( SELECT * FROM biz_message_authorize WHERE user_id = #{userId}) b ON a.id = b.message_id
|
( SELECT * FROM biz_message_authorize WHERE user_id = #{userId}) b ON a.id = b.message_id
|
||||||
</if>
|
</if>
|
||||||
|
|
||||||
ORDER BY createtime DESC
|
ORDER BY createtime DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
@ -60,6 +74,12 @@
|
|||||||
<if test="templatetype!=null and templatetype!=''">
|
<if test="templatetype!=null and templatetype!=''">
|
||||||
and biz_message_template.type = #{templatetype}
|
and biz_message_template.type = #{templatetype}
|
||||||
</if>
|
</if>
|
||||||
|
<if test="templatecodes!=null and templatecodes.size()>0 ">
|
||||||
|
and biz_message.templatecode in
|
||||||
|
<foreach item="item" collection="templatecodes" separator="," open="(" close=")" index="">
|
||||||
|
#{item, jdbcType=NUMERIC}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
ORDER BY createtime DESC
|
ORDER BY createtime DESC
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
@ -3,6 +3,8 @@ package com.chinaunicom.mall.ebtp.extend.bizmessage.dto;
|
|||||||
import io.swagger.annotations.ApiModelProperty;
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 分页明细
|
* 分页明细
|
||||||
*
|
*
|
||||||
@ -26,4 +28,7 @@ public class PageDTO {
|
|||||||
this.pageSize = 15;
|
this.pageSize = 15;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiModelProperty(required = false, value = "指定消息类型,null 查全部")
|
||||||
|
private List<String> templatecodes;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
package com.chinaunicom.mall.ebtp.extend.bizmessage.entity;
|
package com.chinaunicom.mall.ebtp.extend.bizmessage.entity;
|
||||||
|
|
||||||
|
import io.swagger.annotations.ApiModelProperty;
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
@Data
|
@Data
|
||||||
public class BizMessageVo extends BizMessage{
|
public class BizMessageVo extends BizMessage{
|
||||||
|
|
||||||
@ -11,4 +14,6 @@ public class BizMessageVo extends BizMessage{
|
|||||||
private Long datanum;
|
private Long datanum;
|
||||||
private Integer size;
|
private Integer size;
|
||||||
|
|
||||||
|
@ApiModelProperty(required = false, value = "指定消息类型,null 查全部")
|
||||||
|
private List<String> templatecodes;
|
||||||
}
|
}
|
||||||
|
@ -42,9 +42,9 @@ public class BizMessageConsumerServiceImpl implements BizMessageConsumerService
|
|||||||
@Override
|
@Override
|
||||||
public IBizMessagePage<DescribeSiteMsgVO> listOutline(PageDTO page) {
|
public IBizMessagePage<DescribeSiteMsgVO> listOutline(PageDTO page) {
|
||||||
page = createPageCondition(page);
|
page = createPageCondition(page);
|
||||||
|
IPage<BizMessageVo> pageEntity = new Page<BizMessageVo>(page.getPageNo(), page.getPageSize());
|
||||||
|
|
||||||
IPage<BizMessageVo> pageEntity = mapper.findMessageVo(new Page<BizMessageVo>(page.getPageNo(), page.getPageSize()),
|
pageEntity = mapper.findMessageVo(pageEntity,service.getCacheUser().getUserId(),page.getTemplatecodes());
|
||||||
service.getCacheUser().getUserId());
|
|
||||||
|
|
||||||
// DAT -> VO 转换
|
// DAT -> VO 转换
|
||||||
IBizMessagePage<DescribeSiteMsgVO> result = new BizMessagePage<>();
|
IBizMessagePage<DescribeSiteMsgVO> result = new BizMessagePage<>();
|
||||||
|
@ -10,6 +10,9 @@ import com.chinaunicom.baas.util.AccessToken;
|
|||||||
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
|
import com.chinaunicom.mall.ebtp.common.base.service.IBaseCacheUserService;
|
||||||
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
import com.chinaunicom.mall.ebtp.common.base.service.impl.BaseServiceImpl;
|
||||||
import com.chinaunicom.mall.ebtp.common.exception.common.CommonExceptionEnum;
|
import com.chinaunicom.mall.ebtp.common.exception.common.CommonExceptionEnum;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogBusinessModule;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.log.enums.EbtpLogType;
|
||||||
|
import com.chinaunicom.mall.ebtp.common.log.service.OperationLogService;
|
||||||
import com.chinaunicom.mall.ebtp.common.uniBss.constant.UniBssConstant;
|
import com.chinaunicom.mall.ebtp.common.uniBss.constant.UniBssConstant;
|
||||||
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBss;
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBss;
|
||||||
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBssAttached;
|
import com.chinaunicom.mall.ebtp.common.uniBss.entity.UniBssAttached;
|
||||||
@ -53,6 +56,9 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
private @Autowired
|
private @Autowired
|
||||||
IBaseCacheUserService service;
|
IBaseCacheUserService service;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private OperationLogService operationLogService;
|
||||||
|
|
||||||
// 测试 PEM_PATH = "admin_certPrivateNew.pem" CRT_PATH = "adminNew.crt"
|
// 测试 PEM_PATH = "admin_certPrivateNew.pem" CRT_PATH = "adminNew.crt"
|
||||||
// 生产 PEM_PATH = "bidding_certPrivate.pem" CRT_PATH = "bidding.crt"
|
// 生产 PEM_PATH = "bidding_certPrivate.pem" CRT_PATH = "bidding.crt"
|
||||||
// 私钥文件路径 - 加密
|
// 私钥文件路径 - 加密
|
||||||
@ -97,7 +103,8 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
log.info("解密文件:" + CRT_PATH);
|
log.info("解密文件:" + CRT_PATH);
|
||||||
log.info("请求路径:" + bean.getUrl());
|
log.info("请求路径:" + bean.getUrl());
|
||||||
blockChainLog.setInterfaceUrl(bean.getUrl());
|
blockChainLog.setInterfaceUrl(bean.getUrl());
|
||||||
|
String json = "";
|
||||||
|
String str = "";
|
||||||
try {
|
try {
|
||||||
Map<String, Object> map = JSONArray.parseObject(JSONArray.toJSONString(bean.getObject()), Map.class);
|
Map<String, Object> map = JSONArray.parseObject(JSONArray.toJSONString(bean.getObject()), Map.class);
|
||||||
|
|
||||||
@ -106,10 +113,10 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
|
|
||||||
map.put("SIGN", sign);
|
map.put("SIGN", sign);
|
||||||
|
|
||||||
String json = getUniBss(bean.getReqName(), map);
|
json = getUniBss(bean.getReqName(), map);
|
||||||
|
|
||||||
blockChainLog.setParam(json);//请求参数
|
blockChainLog.setParam(json);//请求参数
|
||||||
String str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json);
|
str = UniBssServiceImpl.uniBssHttpPost(bean.getUrl(), json);
|
||||||
blockChainLog.setResult(str);//返回参数
|
blockChainLog.setResult(str);//返回参数
|
||||||
UniBss uniBssRsp = JSONArray.parseObject(str, UniBss.class);
|
UniBss uniBssRsp = JSONArray.parseObject(str, UniBss.class);
|
||||||
if (uniBssRsp != null && UniBssConstant.RESP_CODE_00000.equals(uniBssRsp.getUniBssHead().getRespCode())) {
|
if (uniBssRsp != null && UniBssConstant.RESP_CODE_00000.equals(uniBssRsp.getUniBssHead().getRespCode())) {
|
||||||
@ -132,9 +139,15 @@ public class CrypConfigureServiceImpl extends BaseServiceImpl<CrypConfigureMappe
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
blockChainLog.setStatus(1);
|
blockChainLog.setStatus(1);
|
||||||
blockChainLog.setResult(e.getMessage());
|
blockChainLog.setResult(e.getMessage());
|
||||||
|
|
||||||
|
}finally {
|
||||||
|
if(blockChainLog.getStatus().equals(1)){
|
||||||
|
log.error("区块链调用失败!~-----------------");
|
||||||
|
operationLogService.addOperationLog("区块链同步失败信息,参数{}"+json+"返回信息{}"+str,false, EbtpLogBusinessModule.OTHER, EbtpLogType.INSERT);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
this.iBlockChainLogService.save(blockChainLog);
|
//this.iBlockChainLogService.save(blockChainLog);
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -56,7 +56,7 @@ public class BizExportDict implements Serializable {
|
|||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@ApiModelProperty(value = "")
|
@ApiModelProperty(value = "")
|
||||||
private Integer queryType;
|
private String queryType;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 使能:0、不可用,1、可用
|
* 使能:0、不可用,1、可用
|
||||||
|
@ -9,6 +9,7 @@
|
|||||||
<result column="path" jdbcType="VARCHAR" property="path"/>
|
<result column="path" jdbcType="VARCHAR" property="path"/>
|
||||||
<result column="level" jdbcType="VARCHAR" property="level"/>
|
<result column="level" jdbcType="VARCHAR" property="level"/>
|
||||||
<result column="url" jdbcType="VARCHAR" property="url"/>
|
<result column="url" jdbcType="VARCHAR" property="url"/>
|
||||||
|
<result column="query_type" jdbcType="VARCHAR" property="queryType"/>
|
||||||
<result column="active" jdbcType="VARCHAR" property="active"/>
|
<result column="active" jdbcType="VARCHAR" property="active"/>
|
||||||
<result column="method_dict" jdbcType="VARCHAR" property="methodDict"/>
|
<result column="method_dict" jdbcType="VARCHAR" property="methodDict"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
@ -22,7 +23,7 @@
|
|||||||
</update>
|
</update>
|
||||||
|
|
||||||
<select id="selectDictList" parameterType="java.lang.String" resultMap="BaseResultMap">
|
<select id="selectDictList" parameterType="java.lang.String" resultMap="BaseResultMap">
|
||||||
SELECT `id`, `dic_name`, `path`, `level`, `url`
|
SELECT `id`, `dic_name`, `path`, `level`, `url`, `query_type`
|
||||||
FROM `biz_export_dict`
|
FROM `biz_export_dict`
|
||||||
where active = 1 AND (method_dict = #{type} OR method_dict = '0')
|
where active = 1 AND (method_dict = #{type} OR method_dict = '0')
|
||||||
ORDER BY id
|
ORDER BY id
|
||||||
|
Reference in New Issue
Block a user