提交 8c9ee466 编写于 作者: ibizdev's avatar ibizdev

ibiz4j 发布系统代码 [ibiz-notify,通知消息]

上级 3a759ee5
......@@ -4,7 +4,7 @@
<!--输出实体[MSG_BODY]数据结构 -->
<changeSet author="root" id="tab-msg_body-19-1">
<changeSet author="a_A_5d9d78509" id="tab-msg_body-20-1">
<createTable tableName="IBZMSGBODY">
<column name="ISERROR" remarks="" type="INT">
</column>
......@@ -33,7 +33,7 @@
</column>
<column name="TEMPLPARAMS" remarks="" type="TEXT(1048576)">
</column>
<column name="USERDATA2" remarks="" type="VARCHAR(200)">
<column name="USERDATA2" remarks="" type="VARCHAR(2000)">
</column>
<column name="MSGLINK_PC" remarks="" type="VARCHAR(100)">
</column>
......@@ -42,7 +42,7 @@
<!--输出实体[MSG_OPEN_ACCESS]数据结构 -->
<changeSet author="root" id="tab-msg_open_access-8-2">
<changeSet author="a_A_5d9d78509" id="tab-msg_open_access-8-2">
<createTable tableName="IBZOPENACCESS">
<column name="ACCESSID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_OPEN_ACCESS_ACCESSID"/>
......@@ -74,7 +74,7 @@
<!--输出实体[MSG_TEMPLATE]数据结构 -->
<changeSet author="root" id="tab-msg_template-3-3">
<changeSet author="a_A_5d9d78509" id="tab-msg_template-3-3">
<createTable tableName="IBZMSGTEMPL">
<column name="TID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_TEMPLATE_TID"/>
......@@ -100,7 +100,7 @@
<!--输出实体[MSG_USER_ACCOUNT]数据结构 -->
<changeSet author="root" id="tab-msg_user_account-6-4">
<changeSet author="a_A_5d9d78509" id="tab-msg_user_account-6-4">
<createTable tableName="IBZUSERAUTH">
<column name="AUTHID" remarks="" type="VARCHAR(100)">
<constraints primaryKey="true" primaryKeyName="PK_MSG_USER_ACCOUNT_AUTHID"/>
......
......@@ -204,7 +204,7 @@
"nullable":1,
"physical_field":1,
"data_type":"VARCHAR",
"data_length":200,
"data_length":2000,
"key_field":0,
"show_order":1000,
"major_field":0
......
......@@ -149,7 +149,7 @@ public class MsgBodyDTO extends DTOBase implements Serializable {
*/
@JSONField(name = "user_data2")
@JsonProperty("user_data2")
@Size(min = 0, max = 200, message = "内容长度必须小于等于[200]")
@Size(min = 0, max = 2000, message = "内容长度必须小于等于[2000]")
private String userData2;
/**
......
......@@ -72,7 +72,7 @@ public class MsgOpenAccessResource {
MsgOpenAccess domain = msgopenaccessMapping.toDomain(msgopenaccessdto);
domain .setId(msgopenaccess_id);
msgopenaccessService.update(domain );
MsgOpenAccessDTO dto = msgopenaccessMapping.toDto(domain );
MsgOpenAccessDTO dto = msgopenaccessMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
......@@ -124,8 +124,10 @@ public class MsgOpenAccessResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Save-all')")
@ApiOperation(value = "保存接入开放平台", tags = {"接入开放平台" }, notes = "保存接入开放平台")
@RequestMapping(method = RequestMethod.POST, value = "/msgopenaccesses/save")
public ResponseEntity<Boolean> save(@RequestBody MsgOpenAccessDTO msgopenaccessdto) {
return ResponseEntity.status(HttpStatus.OK).body(msgopenaccessService.save(msgopenaccessMapping.toDomain(msgopenaccessdto)));
public ResponseEntity<MsgOpenAccessDTO> save(@RequestBody MsgOpenAccessDTO msgopenaccessdto) {
MsgOpenAccess domain = msgopenaccessMapping.toDomain(msgopenaccessdto);
msgopenaccessService.save(domain);
return ResponseEntity.status(HttpStatus.OK).body(msgopenaccessMapping.toDto(domain));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgOpenAccess-Save-all')")
......
......@@ -72,7 +72,7 @@ public class MsgTemplateResource {
MsgTemplate domain = msgtemplateMapping.toDomain(msgtemplatedto);
domain .setTid(msgtemplate_id);
msgtemplateService.update(domain );
MsgTemplateDTO dto = msgtemplateMapping.toDto(domain );
MsgTemplateDTO dto = msgtemplateMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
......@@ -124,8 +124,10 @@ public class MsgTemplateResource {
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Save-all')")
@ApiOperation(value = "保存消息模板", tags = {"消息模板" }, notes = "保存消息模板")
@RequestMapping(method = RequestMethod.POST, value = "/msgtemplates/save")
public ResponseEntity<Boolean> save(@RequestBody MsgTemplateDTO msgtemplatedto) {
return ResponseEntity.status(HttpStatus.OK).body(msgtemplateService.save(msgtemplateMapping.toDomain(msgtemplatedto)));
public ResponseEntity<MsgTemplateDTO> save(@RequestBody MsgTemplateDTO msgtemplatedto) {
MsgTemplate domain = msgtemplateMapping.toDomain(msgtemplatedto);
msgtemplateService.save(domain);
return ResponseEntity.status(HttpStatus.OK).body(msgtemplateMapping.toDto(domain));
}
@PreAuthorize("hasAnyAuthority('ROLE_SUPERADMIN','ibznotify-MsgTemplate-Save-all')")
......
......@@ -72,7 +72,7 @@ public class MsgUserAccountResource {
MsgUserAccount domain = msguseraccountMapping.toDomain(msguseraccountdto);
domain .setId(msguseraccount_id);
msguseraccountService.update(domain );
MsgUserAccountDTO dto = msguseraccountMapping.toDto(domain );
MsgUserAccountDTO dto = msguseraccountMapping.toDto(domain);
return ResponseEntity.status(HttpStatus.OK).body(dto);
}
......@@ -123,8 +123,10 @@ public class MsgUserAccountResource {
@ApiOperation(value = "保存绑定消息账号", tags = {"绑定消息账号" }, notes = "保存绑定消息账号")
@RequestMapping(method = RequestMethod.POST, value = "/msguseraccounts/save")
public ResponseEntity<Boolean> save(@RequestBody MsgUserAccountDTO msguseraccountdto) {
return ResponseEntity.status(HttpStatus.OK).body(msguseraccountService.save(msguseraccountMapping.toDomain(msguseraccountdto)));
public ResponseEntity<MsgUserAccountDTO> save(@RequestBody MsgUserAccountDTO msguseraccountdto) {
MsgUserAccount domain = msguseraccountMapping.toDomain(msguseraccountdto);
msguseraccountService.save(domain);
return ResponseEntity.status(HttpStatus.OK).body(msguseraccountMapping.toDto(domain));
}
@ApiOperation(value = "批量保存绑定消息账号", tags = {"绑定消息账号" }, notes = "批量保存绑定消息账号")
......
......@@ -66,7 +66,7 @@ public class DELogicAspect {
* @return
* @throws Throwable
*/
@Around("execution(* cn.ibizlab.core.*.service.*.*(..))")
@Around("execution(* cn.ibizlab.core.*.service.*.*(..)) && !execution(* cn.ibizlab.core.es.service.*.*(..))")
public Object executeLogic(ProceedingJoinPoint point) throws Throwable {
Object args[] = point.getArgs();
if (ObjectUtils.isEmpty(args) || args.length == 0) {
......@@ -90,6 +90,9 @@ public class DELogicAspect {
if (entity != null) {
executeBeforeLogic(entity, action);
Object result = point.proceed();
if("get".equalsIgnoreCase(action) && result instanceof EntityBase){
entity = (EntityBase) result;
}
executeLogic(entity, action);
executeAfterLogic(entity, action);
return result;
......
......@@ -59,15 +59,15 @@ public class LayeringCache extends AbstractValueAdaptingCache {
@Override
public ValueWrapper get(Object key) {
ValueWrapper wrapper = caffeineCache.get(key);
Object value=ObjectUtils.isEmpty(wrapper)?null:wrapper.get();
log.debug("查询一级缓存 key:{} ,value:{}", key,value);
Object value = ObjectUtils.isEmpty(wrapper) ? null : wrapper.get();
log.debug("查询一级缓存 key:{} ", key, value);
if (ObjectUtils.isEmpty(value)) {
wrapper = redisCache.get(key);
value=ObjectUtils.isEmpty(wrapper)?null:wrapper.get();
log.debug("查询二级缓存 key:{} ,value:{}", key,value);
if(!ObjectUtils.isEmpty(value)){
value = ObjectUtils.isEmpty(wrapper) ? null : wrapper.get();
log.debug("查询二级缓存 key:{} ", key);
if (!ObjectUtils.isEmpty(value)) {
caffeineCache.put(key, value);
log.debug("查询二级缓存,并将数据放到一级缓存。 key:{} ,value:{}", key,value);
log.debug("查询二级缓存,并将数据放到一级缓存。 key:{} ", key);
}
}
return wrapper;
......
Markdown 格式
0% or
您添加了 0 到此讨论。请谨慎行事。
先完成此消息的编辑!
想要评论请 注册