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

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

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