Skip to content
项目
群组
代码片段
帮助
正在加载...
帮助
提交反馈
为 GitLab 提交贡献
登录
切换导航
IM
项目
项目
详情
动态
版本
周期分析
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
统计图
议题
0
议题
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
CI / CD
CI / CD
流水线
作业
计划
统计图
Wiki
Wiki
代码片段
代码片段
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
统计图
创建新议题
作业
提交
议题看板
打开侧边栏
iBizPOC_20003
IM
提交
d37b889e
提交
d37b889e
编写于
4月 09, 2020
作者:
ibizdev
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ibizdev提交
上级
cff9a765
变更
26
隐藏空白字符变更
内嵌
并排
正在显示
26 个修改的文件
包含
436 行增加
和
14 行删除
+436
-14
ims.ts
app_Web/src/mock/entity/ims/ims.ts
+38
-0
im-service-base.ts
app_Web/src/service/im/im-service-base.ts
+13
-0
config.xml
config.xml
+0
-8
IMController.java
...rc/main/java/com/ibiz/web/ht/controller/IMController.java
+7
-0
IM.java
...p/im-app-web/src/main/java/com/ibiz/web/ht/domain/IM.java
+33
-0
IMFeignClient.java
...eb/src/main/java/com/ibiz/web/ht/feign/IMFeignClient.java
+3
-0
IMController.java
.../main/java/com/ibiz/wfweb/ht/controller/IMController.java
+7
-0
IM.java
...-app-wfweb/src/main/java/com/ibiz/wfweb/ht/domain/IM.java
+33
-0
IMFeignClient.java
.../src/main/java/com/ibiz/wfweb/ht/feign/IMFeignClient.java
+3
-0
IMService.java
...eb/src/main/java/com/ibiz/wfweb/ht/service/IMService.java
+4
-0
IMController.java
...main/java/com/ibiz/wfweb2/ht/controller/IMController.java
+7
-0
IM.java
...pp-wfweb2/src/main/java/com/ibiz/wfweb2/ht/domain/IM.java
+33
-0
IMFeignClient.java
...src/main/java/com/ibiz/wfweb2/ht/feign/IMFeignClient.java
+3
-0
IMService.java
...2/src/main/java/com/ibiz/wfweb2/ht/service/IMService.java
+4
-0
application-wfweb2.yml
...p/im-app-wfweb2/src/main/resources/application-wfweb2.yml
+5
-5
IM.java
im-core/src/main/java/com/ibiz/core/ht/domain/IM.java
+36
-0
IIMService.java
...re/src/main/java/com/ibiz/core/ht/service/IIMService.java
+1
-0
IMServiceImpl.java
...ain/java/com/ibiz/core/ht/service/impl/IMServiceImpl.java
+7
-0
IMRestDefault.java
...ava/com/ibiz/core/ht/valuerule/anno/im/IMRestDefault.java
+32
-0
IMRestDefaultValidator.java
...ore/ht/valuerule/validator/im/IMRestDefaultValidator.java
+67
-0
IM.java
im-core/src/main/java/com/ibiz/core/repository/po/IM.java
+12
-0
T_IMRepositoryImpl.java
...src/main/java/com/ibiz/mybatis/ht/T_IMRepositoryImpl.java
+4
-0
T_IMImpl.java
...ybatis/src/main/java/com/ibiz/mybatis/ht/po/T_IMImpl.java
+33
-0
T_IMMapper.xml
im-mybatis/src/main/resources/mapper/ht/im/T_IMMapper.xml
+2
-1
IMDTO.java
...ice-web/src/main/java/com/ibiz/service/web/dto/IMDTO.java
+39
-0
IMResource.java
...c/main/java/com/ibiz/service/web/resource/IMResource.java
+10
-0
未找到文件。
app_Web/src/mock/entity/ims/ims.ts
浏览文件 @
d37b889e
...
...
@@ -72,6 +72,44 @@ mock.onPut(new RegExp(/^\/ims\/?([a-zA-Z0-9\-\;]{0,35})$/)).reply((config: any)
console
.
groupEnd
();
return
[
status
,
data
];
});
// HD
mock
.
onPost
(
new
RegExp
(
/^
\/
ims
\/?([
a-zA-Z0-9
\-\;]{0,35})\/
hd$/
)).
reply
((
config
:
any
)
=>
{
console
.
groupCollapsed
(
"实体:im 方法: HD"
);
console
.
table
({
url
:
config
.
url
,
method
:
config
.
method
,
data
:
config
.
data
});
let
status
=
MockAdapter
.
mockStatus
(
config
);
if
(
status
!==
200
)
{
return
[
status
,
null
];
}
const
paramArray
:
Array
<
any
>
=
[
'imid'
];
const
matchArray
:
any
=
new
RegExp
(
/^
\/
ims
\/([
a-zA-Z0-9
\-\;]{1,35})\/
hd$/
).
exec
(
config
.
url
);
let
tempValue
:
any
=
{};
if
(
matchArray
&&
matchArray
.
length
>
1
&&
paramArray
&&
paramArray
.
length
>
0
){
paramArray
.
forEach
((
item
:
any
,
index
:
number
)
=>
{
Object
.
defineProperty
(
tempValue
,
item
,
{
enumerable
:
true
,
value
:
matchArray
[
index
+
1
]
});
});
}
//let items = mockDatas ? mockDatas : [];
//let _items = items.find((item: any) => Object.is(item.imid, tempValue.imid));
let
data
=
JSON
.
parse
(
config
.
data
);
mockDatas
.
forEach
((
item
)
=>
{
if
(
item
[
'imid'
]
==
tempValue
[
'imid'
]
){
for
(
let
value
in
data
){
if
(
item
.
hasOwnProperty
(
value
)){
item
[
value
]
=
data
[
value
];
}
}
}
})
console
.
groupCollapsed
(
"response数据 status: "
+
status
+
" data: "
);
console
.
table
(
data
);
console
.
groupEnd
();
console
.
groupEnd
();
return
[
status
,
data
];
});
// GetDraft
mock
.
onGet
(
new
RegExp
(
/^
\/
ims
\/
getdraft$/
)).
reply
((
config
:
any
)
=>
{
...
...
app_Web/src/service/im/im-service-base.ts
浏览文件 @
d37b889e
...
...
@@ -65,6 +65,19 @@ export default class IMServiceBase extends EntityService {
return
res
;
}
/**
* HD接口方法
*
* @param {*} [context={}]
* @param {*} [data={}]
* @param {boolean} [isloading]
* @returns {Promise<any>}
* @memberof IMServiceBase
*/
public
async
HD
(
context
:
any
=
{},
data
:
any
=
{},
isloading
?:
boolean
):
Promise
<
any
>
{
return
Http
.
getInstance
().
post
(
`/ims/
${
context
.
im
}
/hd`
,
data
,
isloading
);
}
/**
* GetDraft接口方法
*
...
...
config.xml
浏览文件 @
d37b889e
...
...
@@ -40,14 +40,6 @@
mvn install
cd ..
mvn install
cd im-app/im-app-wfweb
mvn clean package -Pprod
echo
'
echo
"
$para1
"'
>
apppasswd.sh
chmod -R 777 *
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
mkdir -p /ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
scp -r ./target/im-app-wfweb.jar root@172.16.102.61:/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
ps -ef | grep
'
/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F
'
| tr -s
'
'
|cut -d
'
'
-f2,8,9 | grep -v grep | grep
'
jar
'
| cut -d
'
'
-f1|xargs --no-run-if-empty kill -9
"
setsid env SSH_ASKPASS=
'
./apppasswd.sh
'
DISPLAY=
'
none:0
'
ssh root@172.16.102.61
"
source /etc/profile;source ~/.bash_profile; nohup java -jar -Xms512m -Xmx1024m -XX:PermSize=128M -XX:MaxPermSize=128m /ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F/im-app-wfweb.jar
>>
/ibiz/nodes/node1/AAD5D106-FE84-4E18-985D-A43198FE466F/im_appim 流程应用-`date --date=
'
0 days ago
'
+%Y-%m-%d`.log 2
>&
1
&"
</command>
</hudson.tasks.Shell>
</builders>
...
...
im-app/im-app-web/src/main/java/com/ibiz/web/ht/controller/IMController.java
浏览文件 @
d37b889e
...
...
@@ -40,6 +40,13 @@ public class IMController {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ims/{im_id}/hd"
)
@PreAuthorize
(
"@im_pms.check(#im_id,'')"
)
public
ResponseEntity
<
IM
>
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
{
IM
im2
=
imservice
.
hD
(
im_id
,
im
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ims/getdraft"
)
@PreAuthorize
(
"@im_pms.check('CREATE')"
)
public
ResponseEntity
<
IM
>
getDraft
()
{
...
...
im-app/im-app-web/src/main/java/com/ibiz/web/ht/domain/IM.java
浏览文件 @
d37b889e
...
...
@@ -366,6 +366,14 @@ public class IM implements Serializable {
@JsonIgnore
private
boolean
psidDirtyFlag
;
/**
* REST
*/
private
String
rest
;
@JsonIgnore
private
boolean
restDirtyFlag
;
/**
* 获取 [跨公司领导人员清单]
...
...
@@ -1442,6 +1450,31 @@ public class IM implements Serializable {
return
this
.
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
@JsonProperty
(
"rest"
)
public
String
getRest
(){
return
this
.
rest
;
}
/**
* 设置 [REST]
*/
@JsonProperty
(
"rest"
)
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
public
boolean
getRestDirtyFlag
(){
return
this
.
restDirtyFlag
;
}
}
im-app/im-app-web/src/main/java/com/ibiz/web/ht/feign/IMFeignClient.java
浏览文件 @
d37b889e
...
...
@@ -23,6 +23,9 @@ public interface IMFeignClient {
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/web/ims/{im_id}"
)
public
IM
update
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/web/ims/{im_id}/hd"
)
public
IM
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/web/ims/{im_id}/getdraft"
)
public
IM
getDraft
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
...
...
im-app/im-app-wfweb/src/main/java/com/ibiz/wfweb/ht/controller/IMController.java
浏览文件 @
d37b889e
...
...
@@ -40,6 +40,13 @@ public class IMController {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ims/{im_id}/hd"
)
@PreAuthorize
(
"@im_pms.check(#im_id,'')"
)
public
ResponseEntity
<
IM
>
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
{
IM
im2
=
imservice
.
hD
(
im_id
,
im
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ims/getdraft"
)
@PreAuthorize
(
"@im_pms.check('CREATE')"
)
public
ResponseEntity
<
IM
>
getDraft
()
{
...
...
im-app/im-app-wfweb/src/main/java/com/ibiz/wfweb/ht/domain/IM.java
浏览文件 @
d37b889e
...
...
@@ -366,6 +366,14 @@ public class IM implements Serializable {
@JsonIgnore
private
boolean
psidDirtyFlag
;
/**
* REST
*/
private
String
rest
;
@JsonIgnore
private
boolean
restDirtyFlag
;
/**
* 获取 [跨公司领导人员清单]
...
...
@@ -1442,6 +1450,31 @@ public class IM implements Serializable {
return
this
.
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
@JsonProperty
(
"rest"
)
public
String
getRest
(){
return
this
.
rest
;
}
/**
* 设置 [REST]
*/
@JsonProperty
(
"rest"
)
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
public
boolean
getRestDirtyFlag
(){
return
this
.
restDirtyFlag
;
}
}
im-app/im-app-wfweb/src/main/java/com/ibiz/wfweb/ht/feign/IMFeignClient.java
浏览文件 @
d37b889e
...
...
@@ -23,6 +23,9 @@ public interface IMFeignClient {
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/web/ims/{im_id}"
)
public
IM
update
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/web/ims/{im_id}/hd"
)
public
IM
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/web/ims/{im_id}/getdraft"
)
public
IM
getDraft
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
...
...
im-app/im-app-wfweb/src/main/java/com/ibiz/wfweb/ht/service/IMService.java
浏览文件 @
d37b889e
...
...
@@ -97,6 +97,10 @@ public class IMService {
return
client
.
update
(
im_id
,
im
);
}
public
IM
hD
(
String
im_id
,
IM
im
)
{
return
client
.
hD
(
im_id
,
im
);
}
public
IM
getDraft
(
String
im_id
,
IM
im
)
{
return
client
.
getDraft
(
im_id
,
im
);
}
...
...
im-app/im-app-wfweb2/src/main/java/com/ibiz/wfweb2/ht/controller/IMController.java
浏览文件 @
d37b889e
...
...
@@ -40,6 +40,13 @@ public class IMController {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/ims/{im_id}/hd"
)
@PreAuthorize
(
"@im_pms.check(#im_id,'')"
)
public
ResponseEntity
<
IM
>
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
{
IM
im2
=
imservice
.
hD
(
im_id
,
im
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
im2
);
}
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/ims/getdraft"
)
@PreAuthorize
(
"@im_pms.check('CREATE')"
)
public
ResponseEntity
<
IM
>
getDraft
()
{
...
...
im-app/im-app-wfweb2/src/main/java/com/ibiz/wfweb2/ht/domain/IM.java
浏览文件 @
d37b889e
...
...
@@ -366,6 +366,14 @@ public class IM implements Serializable {
@JsonIgnore
private
boolean
psidDirtyFlag
;
/**
* REST
*/
private
String
rest
;
@JsonIgnore
private
boolean
restDirtyFlag
;
/**
* 获取 [跨公司领导人员清单]
...
...
@@ -1442,6 +1450,31 @@ public class IM implements Serializable {
return
this
.
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
@JsonProperty
(
"rest"
)
public
String
getRest
(){
return
this
.
rest
;
}
/**
* 设置 [REST]
*/
@JsonProperty
(
"rest"
)
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
public
boolean
getRestDirtyFlag
(){
return
this
.
restDirtyFlag
;
}
}
im-app/im-app-wfweb2/src/main/java/com/ibiz/wfweb2/ht/feign/IMFeignClient.java
浏览文件 @
d37b889e
...
...
@@ -23,6 +23,9 @@ public interface IMFeignClient {
@RequestMapping
(
method
=
RequestMethod
.
PUT
,
value
=
"/web/ims/{im_id}"
)
public
IM
update
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/web/ims/{im_id}/hd"
)
public
IM
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/web/ims/{im_id}/getdraft"
)
public
IM
getDraft
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IM
im
)
;
...
...
im-app/im-app-wfweb2/src/main/java/com/ibiz/wfweb2/ht/service/IMService.java
浏览文件 @
d37b889e
...
...
@@ -97,6 +97,10 @@ public class IMService {
return
client
.
update
(
im_id
,
im
);
}
public
IM
hD
(
String
im_id
,
IM
im
)
{
return
client
.
hD
(
im_id
,
im
);
}
public
IM
getDraft
(
String
im_id
,
IM
im
)
{
return
client
.
getDraft
(
im_id
,
im
);
}
...
...
im-app/im-app-wfweb2/src/main/resources/application-wfweb2.yml
浏览文件 @
d37b889e
server
:
devmode
:
fals
e
port
:
8
203
devmode
:
tru
e
port
:
8
080
servlet
:
session
:
cookie
:
...
...
@@ -17,11 +17,11 @@ spring:
security
:
cas
:
server
:
host
:
http
s://passport
.ibizlab.cn
host
:
http
://passportcs
.ibizlab.cn
login
:
${security.cas.server.host}/login
logout
:
${security.cas.server.host}/logout
service
:
host
:
http://
172.16.102.61
:${server.port}
host
:
http://
localhost
:${server.port}
login
:
/login/cas
logout
:
/logout
...
...
@@ -36,7 +36,7 @@ logging:
app
:
web
:
url
:
http://
172.16.102.61
:${server.port}
url
:
http://
localhost
:${server.port}
wfstarturl
:
/#/%s/null/editview
# wfviewurl: /#/dewfdataredirectview
wfviewurl
:
/#/appwfdataredirectview
...
...
im-core/src/main/java/com/ibiz/core/ht/domain/IM.java
浏览文件 @
d37b889e
...
...
@@ -410,6 +410,15 @@ public class IM implements Serializable {
@JSONField
(
serialize
=
false
)
private
boolean
psidDirtyFlag
;
/**
* REST
*/
private
String
rest
;
@JsonIgnore
@JSONField
(
serialize
=
false
)
private
boolean
restDirtyFlag
;
/**
* 获取 [跨公司领导人员清单]
...
...
@@ -1572,6 +1581,33 @@ public class IM implements Serializable {
public
boolean
getPsidDirtyFlag
(){
return
this
.
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
@JsonProperty
(
"rest"
)
@JSONField
(
name
=
"rest"
)
public
String
getRest
(){
return
this
.
rest
;
}
/**
* 设置 [REST]
*/
@JsonProperty
(
"rest"
)
@JSONField
(
name
=
"rest"
)
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
@JSONField
(
serialize
=
false
)
public
boolean
getRestDirtyFlag
(){
return
this
.
restDirtyFlag
;
}
}
im-core/src/main/java/com/ibiz/core/ht/service/IIMService.java
浏览文件 @
d37b889e
...
...
@@ -19,6 +19,7 @@ import com.ibiz.core.ht.filter.IMSearchContext;
public
interface
IIMService
{
boolean
update
(
IM
iM
)
;
IM
hD
(
IM
iM
)
;
IM
getDraft
(
IM
iM
)
;
boolean
create
(
IM
iM
)
;
boolean
remove
(
String
iMId
)
;
...
...
im-core/src/main/java/com/ibiz/core/ht/service/impl/IMServiceImpl.java
浏览文件 @
d37b889e
...
...
@@ -42,6 +42,13 @@ public class IMServiceImpl implements IIMService {
return
bOk
;
}
@Override
@Transactional
public
IM
hD
(
IM
im
)
{
return
im
;
}
@Override
public
IM
getDraft
(
IM
im
)
{
return
im
;
...
...
im-core/src/main/java/com/ibiz/core/ht/valuerule/anno/im/IMRestDefault.java
0 → 100644
浏览文件 @
d37b889e
package
com
.
ibiz
.
core
.
ht
.
valuerule
.
anno
.
im
;
import
com.ibiz.core.ht.valuerule.validator.im.IMRestDefaultValidator
;
import
javax.validation.Constraint
;
import
javax.validation.Payload
;
import
java.lang.annotation.*
;
/**
* 值规则注解
* 实体:IM
* 属性:Rest
* 值规则:Default
*/
@Target
({
ElementType
.
METHOD
,
ElementType
.
FIELD
,
ElementType
.
PARAMETER
})
@Retention
(
RetentionPolicy
.
RUNTIME
)
@Documented
@Constraint
(
validatedBy
=
{
IMRestDefaultValidator
.
class
})
public
@interface
IMRestDefault
{
//是否默认检查
boolean
flag
()
default
true
;
//值规则名称
String
info
()
default
"默认规则"
;
//值规则信息,如果为空,使用值规则名称。
String
message
()
default
"内容长度必须小于等于[2000]"
;
Class
<?>[]
groups
()
default
{};
Class
<?
extends
Payload
>[]
payload
()
default
{};
}
im-core/src/main/java/com/ibiz/core/ht/valuerule/validator/im/IMRestDefaultValidator.java
0 → 100644
浏览文件 @
d37b889e
package
com
.
ibiz
.
core
.
ht
.
valuerule
.
validator
.
im
;
import
lombok.extern.slf4j.Slf4j
;
import
com.ibiz.util.valuerule.DefaultValueRule
;
import
com.ibiz.util.valuerule.VRCondition
;
import
com.ibiz.util.valuerule.condition.*
;
import
com.ibiz.core.ht.valuerule.anno.im.IMRestDefault
;
import
org.springframework.stereotype.Component
;
import
org.springframework.validation.Errors
;
import
org.springframework.validation.Validator
;
import
javax.validation.ConstraintValidator
;
import
javax.validation.ConstraintValidatorContext
;
import
java.sql.Timestamp
;
import
java.util.ArrayList
;
import
java.util.List
;
import
java.util.Map
;
import
java.math.BigInteger
;
import
java.util.HashMap
;
import
java.math.BigDecimal
;
/**
* 值规则注解解析类
* 实体:IM
* 属性:Rest
* 值规则:Default
* 值规则信息:内容长度必须小于等于[2000]
*/
@Slf4j
@Component
(
"IMRestDefaultValidator"
)
public
class
IMRestDefaultValidator
implements
ConstraintValidator
<
IMRestDefault
,
String
>,
Validator
{
private
static
final
String
MESSAGE
=
"值规则校验失败:【内容长度必须小于等于[2000]】"
;
@Override
public
boolean
isValid
(
String
value
,
ConstraintValidatorContext
context
)
{
boolean
isValid
=
doValidate
(
value
);
if
(!
isValid
)
{
context
.
disableDefaultConstraintViolation
();
context
.
buildConstraintViolationWithTemplate
(
MESSAGE
)
.
addConstraintViolation
();
}
return
doValidate
(
value
);
}
@Override
public
boolean
supports
(
Class
<?>
aClass
)
{
return
true
;
}
@Override
public
void
validate
(
Object
o
,
Errors
errors
)
{
if
(
o
!=
null
&&
supports
(
o
.
getClass
())){
if
(!
doValidate
((
String
)
o
)){
errors
.
reject
(
MESSAGE
);
}
}
}
public
boolean
doValidate
(
String
value
)
{
DefaultValueRule
<
String
>
valueRule
=
new
DefaultValueRule
<>(
"默认值规则"
,
MESSAGE
,
"Rest"
,
value
)
//字符串长度,重复检查模式,重复值范围,基础值规则,是否递归检查。
.
init
(
2000
,
"NONE"
,
null
,
null
,
false
);
return
valueRule
.
isValid
();
}
}
im-core/src/main/java/com/ibiz/core/repository/po/IM.java
浏览文件 @
d37b889e
...
...
@@ -527,4 +527,16 @@ public interface IM{
*/
boolean
getPsidDirtyFlag
();
/**
* REST
*/
String
getRest
();
void
setRest
(
String
rest
);
/**
* 获取 [REST]脏标记
*/
boolean
getRestDirtyFlag
();
}
im-mybatis/src/main/java/com/ibiz/mybatis/ht/T_IMRepositoryImpl.java
浏览文件 @
d37b889e
...
...
@@ -200,6 +200,8 @@ public class T_IMRepositoryImpl extends ServiceImpl<T_IMMapper, T_IMImpl> implem
domain
.
setNgrbmid
(
po
.
getNgrbmid
());
//if(po.getPsidDirtyFlag())
domain
.
setPsid
(
po
.
getPsid
());
//if(po.getRestDirtyFlag())
domain
.
setRest
(
po
.
getRest
());
return
domain
;
}
...
...
@@ -301,6 +303,8 @@ public class T_IMRepositoryImpl extends ServiceImpl<T_IMMapper, T_IMImpl> implem
po
.
setNgrbmid
(
domain
.
getNgrbmid
());
if
(
domain
.
getPsidDirtyFlag
())
po
.
setPsid
(
domain
.
getPsid
());
if
(
domain
.
getRestDirtyFlag
())
po
.
setRest
(
domain
.
getRest
());
return
po
;
}
...
...
im-mybatis/src/main/java/com/ibiz/mybatis/ht/po/T_IMImpl.java
浏览文件 @
d37b889e
...
...
@@ -499,6 +499,17 @@ public class T_IMImpl implements IM,Serializable {
@TableField
(
exist
=
false
)
private
boolean
psidDirtyFlag
;
/**
* [REST]
*/
private
String
rest
;
/**
* [REST]脏标记
*/
@JsonIgnore
@TableField
(
exist
=
false
)
private
boolean
restDirtyFlag
;
/**
* 获取 [跨公司领导人员清单]
*/
...
...
@@ -1445,4 +1456,26 @@ public class T_IMImpl implements IM,Serializable {
public
boolean
getPsidDirtyFlag
(){
return
this
.
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
public
String
getRest
(){
return
this
.
rest
;
}
/**
* 设置 [REST]
*/
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
public
boolean
getRestDirtyFlag
(){
return
this
.
restDirtyFlag
;
}
}
\ No newline at end of file
im-mybatis/src/main/resources/mapper/ht/im/T_IMMapper.xml
浏览文件 @
d37b889e
...
...
@@ -51,6 +51,7 @@
<if
test=
"true == et.ngridDirtyFlag"
>
ngrid = #{et.ngrid},
</if>
<if
test=
"true == et.ngrbmidDirtyFlag"
>
ngrbmid = #{et.ngrbmid},
</if>
<if
test=
"true == et.psidDirtyFlag"
>
psid = #{et.psid},
</if>
<if
test=
"true == et.restDirtyFlag"
>
rest = #{et.rest},
</if>
</trim>
where t.imid = #{et.iMId}
</update>
...
...
@@ -68,7 +69,7 @@
<!--输出平台内配置的数据查询[DEFAULT]-->
<select
id=
"searchDefault"
parameterType=
"com.ibiz.core.ht.filter.IMSearchContext"
resultMap=
"T_IMResultMap"
databaseId=
"mysql"
>
select t1.* from (
<![CDATA[ SELECT t1.`BMLD`, t1.`BMLDIDS`, t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HJCD`, t1.`HQBM`, t1.`HQBMIDS`, t1.`IMID`, t1.`IMNAME`, t1.`IMWFSTATE`, t1.`JJYY`, t1.`KGSBM`, t1.`KGSBMIDS`, t1.`KGSLD`, t1.`KGSLDIDS`, t1.`LCBH`, t1.`LD`, t1.`LDIDS`, t1.`NGRBMID`, t1.`NGRBMNAME`, t1.`NGRID`, t1.`NGRJG`, t1.`NGRLXFS`, t1.`NGRNAME`, t1.`NGRQ`, t1.`NGSH`, t1.`NGSHIDS`, t1.`PSID`, t1.`QTTZYDDX`, t1.`SBLB`, t1.`SBLX`, t1.`SDFS`, t1.`SHFS`, t1.`SJBM`, t1.`TZYD`, t1.`TZYDYY`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WFINSTANCEID`, t1.`WFSTEP`, t1.`YZDX`, t1.`ZBBM` FROM `T_IM` t1 ]]>
<![CDATA[ SELECT t1.`BMLD`, t1.`BMLDIDS`, t1.`BZ`, t1.`CREATEDATE`, t1.`CREATEMAN`, t1.`HJCD`, t1.`HQBM`, t1.`HQBMIDS`, t1.`IMID`, t1.`IMNAME`, t1.`IMWFSTATE`, t1.`JJYY`, t1.`KGSBM`, t1.`KGSBMIDS`, t1.`KGSLD`, t1.`KGSLDIDS`, t1.`LCBH`, t1.`LD`, t1.`LDIDS`, t1.`NGRBMID`, t1.`NGRBMNAME`, t1.`NGRID`, t1.`NGRJG`, t1.`NGRLXFS`, t1.`NGRNAME`, t1.`NGRQ`, t1.`NGSH`, t1.`NGSHIDS`, t1.`PSID`, t1.`QTTZYDDX`, t1.`
REST`, t1.`
SBLB`, t1.`SBLX`, t1.`SDFS`, t1.`SHFS`, t1.`SJBM`, t1.`TZYD`, t1.`TZYDYY`, t1.`UPDATEDATE`, t1.`UPDATEMAN`, t1.`WFINSTANCEID`, t1.`WFSTEP`, t1.`YZDX`, t1.`ZBBM` FROM `T_IM` t1 ]]>
<![CDATA[ ]]>
)t1
<where><if
test=
"ew!=null and ew.sqlSegment!=null and !ew.emptyOfWhere"
>
${ew.sqlSegment}
</if></where>
...
...
im-service/im-service-web/src/main/java/com/ibiz/service/web/dto/IMDTO.java
浏览文件 @
d37b889e
...
...
@@ -457,6 +457,16 @@ public class IMDTO implements Serializable {
@JsonIgnore
private
boolean
psidDirtyFlag
;
/**
* 属性 [REST]
*
*/
@IMRestDefault
(
info
=
"默认规则"
)
private
String
rest
;
@JsonIgnore
private
boolean
restDirtyFlag
;
/**
* 获取 [KGSLDIDS]
...
...
@@ -1533,6 +1543,31 @@ public class IMDTO implements Serializable {
return
psidDirtyFlag
;
}
/**
* 获取 [REST]
*/
@JsonProperty
(
"rest"
)
public
String
getRest
(){
return
rest
;
}
/**
* 设置 [REST]
*/
@JsonProperty
(
"rest"
)
public
void
setRest
(
String
rest
){
this
.
rest
=
rest
;
this
.
restDirtyFlag
=
true
;
}
/**
* 获取 [REST]脏标记
*/
@JsonIgnore
public
boolean
getRestDirtyFlag
(){
return
restDirtyFlag
;
}
public
IM
toDO
()
{
...
...
@@ -1623,6 +1658,8 @@ public class IMDTO implements Serializable {
srfdomain
.
setNgrbmid
(
ngrbmid
);
if
(
getPsidDirtyFlag
())
srfdomain
.
setPsid
(
psid
);
if
(
getRestDirtyFlag
())
srfdomain
.
setRest
(
rest
);
return
srfdomain
;
}
...
...
@@ -1716,6 +1753,8 @@ public class IMDTO implements Serializable {
this
.
setNgrbmid
(
srfdomain
.
getNgrbmid
());
if
(
srfdomain
.
getPsidDirtyFlag
())
this
.
setPsid
(
srfdomain
.
getPsid
());
if
(
srfdomain
.
getRestDirtyFlag
())
this
.
setRest
(
srfdomain
.
getRest
());
}
...
...
im-service/im-service-web/src/main/java/com/ibiz/service/web/resource/IMResource.java
浏览文件 @
d37b889e
...
...
@@ -56,6 +56,16 @@ public class IMResource {
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
dto
);
}
@ApiOperation
(
value
=
"回调"
,
tags
=
{
"IM"
},
notes
=
"回调"
)
@RequestMapping
(
method
=
RequestMethod
.
POST
,
value
=
"/web/ims/{im_id}/hd"
)
@Transactional
public
ResponseEntity
<
IMDTO
>
hD
(
@PathVariable
(
"im_id"
)
String
im_id
,
@RequestBody
IMDTO
imdto
)
{
IM
im
=
imdto
.
toDO
();
im
=
imService
.
hD
(
im
)
;
imdto
.
fromDO
(
im
);
return
ResponseEntity
.
status
(
HttpStatus
.
OK
).
body
(
imdto
);
}
@ApiOperation
(
value
=
"GetDraft"
,
tags
=
{
"IM"
},
notes
=
"GetDraft"
)
@RequestMapping
(
method
=
RequestMethod
.
GET
,
value
=
"/web/ims/{im_id}/getdraft"
)
@Transactional
...
...
编辑
预览
Markdown
格式
0%
请重试
or
添加新附件
添加附件
取消
您添加了
0
人
到此讨论。请谨慎行事。
先完成此消息的编辑!
取消
想要评论请
注册
或
登录