Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gic-platform-enterprise
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
base_platform_enterprise
gic-platform-enterprise
Commits
2bc266b5
Commit
2bc266b5
authored
Jul 27, 2021
by
guojuxing
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
砍掉待办事项功能
parent
30fd4d46
Hide whitespace changes
Inline
Side-by-side
Showing
18 changed files
with
30 additions
and
1292 deletions
+30
-1292
TodoItemTimeTypeEnum.java
...ava/com/gic/enterprise/constant/TodoItemTimeTypeEnum.java
+0
-39
TodoItemDTO.java
...api/src/main/java/com/gic/enterprise/dto/TodoItemDTO.java
+0
-196
TodoItemQO.java
...e-api/src/main/java/com/gic/enterprise/qo/TodoItemQO.java
+0
-76
DictApiService.java
.../main/java/com/gic/enterprise/service/DictApiService.java
+0
-9
TodoItemApiService.java
...n/java/com/gic/enterprise/service/TodoItemApiService.java
+0
-74
TabTodoItemMapper.java
...java/com/gic/enterprise/dao/mapper/TabTodoItemMapper.java
+0
-103
TabTodoItem.java
.../src/main/java/com/gic/enterprise/entity/TabTodoItem.java
+0
-157
TodoItemService.java
...main/java/com/gic/enterprise/service/TodoItemService.java
+0
-81
BillingAccountServiceImpl.java
...ic/enterprise/service/impl/BillingAccountServiceImpl.java
+0
-6
TodoItemServiceImpl.java
.../com/gic/enterprise/service/impl/TodoItemServiceImpl.java
+0
-64
AuditLogApiServiceImpl.java
...enterprise/service/outer/impl/AuditLogApiServiceImpl.java
+18
-41
BillingAccountApiServiceImpl.java
...rise/service/outer/impl/BillingAccountApiServiceImpl.java
+12
-33
DictApiServiceImpl.java
...gic/enterprise/service/outer/impl/DictApiServiceImpl.java
+0
-10
TodoItemApiServiceImpl.java
...enterprise/service/outer/impl/TodoItemApiServiceImpl.java
+0
-92
dubbo-gic-platform-enterprise-service.xml
.../main/resources/dubbo-gic-platform-enterprise-service.xml
+0
-2
TabTodoItemMapper.xml
...e-service/src/main/resources/mapper/TabTodoItemMapper.xml
+0
-254
TodoItemController.java
...com/gic/enterprise/web/controller/TodoItemController.java
+0
-54
dubbo-gic-platform-enterprise-web.xml
.../src/main/resources/dubbo-gic-platform-enterprise-web.xml
+0
-1
No files found.
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/constant/TodoItemTimeTypeEnum.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
constant
;
/**
* 代办事项天数
* @Description:
* @author zhiwj
* @date 2019-11-14 16:54
*/
public
enum
TodoItemTimeTypeEnum
{
/**
* 近三天
*/
THREE_DAY
(
1
,
"近三天"
),
/**
* 近一周
*/
WEEK
(
2
,
"近一周"
),
/**
* 近半年
*/
HALF_YEAR
(
3
,
"近半年"
)
;
private
int
code
;
private
String
message
;
TodoItemTimeTypeEnum
(
int
code
,
String
message
)
{
this
.
code
=
code
;
this
.
message
=
message
;
}
public
int
getCode
()
{
return
code
;
}
public
String
getMessage
()
{
return
message
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/dto/TodoItemDTO.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
dto
;
import
javax.validation.constraints.NotBlank
;
import
javax.validation.constraints.NotNull
;
import
java.io.Serializable
;
import
java.util.Date
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 16:30
*/
public
class
TodoItemDTO
implements
Serializable
{
private
static
final
long
serialVersionUID
=
4045622084431661140L
;
public
interface
SaveValidView
{}
/**
*
*/
private
Integer
todoItemId
;
/**
*
*/
@NotNull
(
message
=
"商户id不能为空"
,
groups
=
SaveValidView
.
class
)
private
Integer
enterpriseId
;
/**
*
*/
@NotNull
(
message
=
"用户id不能为空"
,
groups
=
SaveValidView
.
class
)
private
Integer
userId
;
/**
* 事项内容
*/
@NotBlank
(
message
=
"事项内容不能为空"
,
groups
=
SaveValidView
.
class
)
private
String
itemContent
;
/**
* 0:待处理 1:未完成
*/
private
Integer
finish
;
/**
* 事项类型 (字典的code)
*/
@NotBlank
(
message
=
"事项类型不能为空"
,
groups
=
SaveValidView
.
class
)
private
String
itemType
;
/**
* 完成时间
*/
private
Date
finishTime
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
deleteFlag
;
/**
* 跳转的url 不加域名 比如: /damo-system/user/approve?id=1
*
*/
@NotBlank
(
message
=
"url不能为空"
,
groups
=
SaveValidView
.
class
)
private
String
itemInfoUrl
;
private
String
itemTypeName
;
public
void
setItemTypeName
(
String
itemTypeName
)
{
this
.
itemTypeName
=
itemTypeName
;
}
public
String
getItemTypeName
()
{
return
itemTypeName
;
}
public
Integer
getTodoItemId
()
{
return
todoItemId
;
}
public
void
setTodoItemId
(
Integer
todoItemId
)
{
this
.
todoItemId
=
todoItemId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getItemContent
()
{
return
itemContent
;
}
public
void
setItemContent
(
String
itemContent
)
{
this
.
itemContent
=
itemContent
;
}
public
Integer
getFinish
()
{
return
finish
;
}
public
void
setFinish
(
Integer
finish
)
{
this
.
finish
=
finish
;
}
public
String
getItemType
()
{
return
itemType
;
}
public
void
setItemType
(
String
itemType
)
{
this
.
itemType
=
itemType
;
}
public
Date
getFinishTime
()
{
return
finishTime
;
}
public
void
setFinishTime
(
Date
finishTime
)
{
this
.
finishTime
=
finishTime
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
TodoItemDTO
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
return
this
;
}
public
String
getItemInfoUrl
()
{
return
itemInfoUrl
;
}
public
void
setItemInfoUrl
(
String
itemInfoUrl
)
{
this
.
itemInfoUrl
=
itemInfoUrl
;
}
@Override
public
String
toString
()
{
return
"TodoItemDTO{"
+
"todoItemId="
+
todoItemId
+
", enterpriseId="
+
enterpriseId
+
", userId="
+
userId
+
", itemContent='"
+
itemContent
+
'\''
+
", finish="
+
finish
+
", itemType='"
+
itemType
+
'\''
+
", finishTime="
+
finishTime
+
", createTime="
+
createTime
+
", updateTime="
+
updateTime
+
", status="
+
deleteFlag
+
", itemInfoUrl='"
+
itemInfoUrl
+
'\''
+
", itemTypeName='"
+
itemTypeName
+
'\''
+
'}'
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/qo/TodoItemQO.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
qo
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 16:41
*/
public
class
TodoItemQO
extends
PageQO
{
private
static
final
long
serialVersionUID
=
5807419087854634055L
;
private
Integer
enterpriseId
;
private
Integer
userId
;
private
Integer
finish
;
private
String
itemType
;
private
String
search
;
private
String
startTime
;
private
String
endTime
;
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
Integer
getFinish
()
{
return
finish
;
}
public
void
setFinish
(
Integer
finish
)
{
this
.
finish
=
finish
;
}
public
String
getItemType
()
{
return
itemType
;
}
public
void
setItemType
(
String
itemType
)
{
this
.
itemType
=
itemType
;
}
public
String
getSearch
()
{
return
search
;
}
public
void
setSearch
(
String
search
)
{
this
.
search
=
search
;
}
public
String
getStartTime
()
{
return
startTime
;
}
public
void
setStartTime
(
String
startTime
)
{
this
.
startTime
=
startTime
;
}
public
String
getEndTime
()
{
return
endTime
;
}
public
void
setEndTime
(
String
endTime
)
{
this
.
endTime
=
endTime
;
}
}
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/DictApiService.java
View file @
2bc266b5
...
@@ -78,15 +78,6 @@ public interface DictApiService {
...
@@ -78,15 +78,6 @@ public interface DictApiService {
*/
*/
ServiceResponse
<
List
<
DictDTO
>>
listSmsAppType
();
ServiceResponse
<
List
<
DictDTO
>>
listSmsAppType
();
/**
* 待办事项类型
* @Title: listTodoItemType
* @Description:
* @author zhiwj
* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.enterprise.dto.DictDTO>>
* @throws
*/
ServiceResponse
<
List
<
DictDTO
>>
listTodoItemType
();
/**
/**
* listRequestCode
* listRequestCode
...
...
gic-platform-enterprise-api/src/main/java/com/gic/enterprise/service/TodoItemApiService.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
service
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.qo.TodoItemQO
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 16:33
*/
public
interface
TodoItemApiService
{
/**
* 保存待办事项
* @Title: saveTodoItem
* @Description:
* @author zhiwj
* @param todoItemDTO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
saveTodoItem
(
TodoItemDTO
todoItemDTO
);
/**
* 完成待办事项
* @Title: finishTodoItem
* @Description:
* @author zhiwj
* @param enterpriseId
* @param userId
* @param itemType
* @param itemInfoUrl
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>
* @throws
*/
ServiceResponse
<
Void
>
finishTodoItem
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
);
/**
* 查询列表
* @Title: listTodoItem
* @Description:
* @author zhiwj
* @param todoItemQO
* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.TodoItemDTO>
* @throws
*/
ServiceResponse
<
Page
<
TodoItemDTO
>>
listTodoItem
(
TodoItemQO
todoItemQO
);
/**
* 查详情
* @Title: getTodoItem
* @Description:
* @author zhiwj
* @param todoItemId
* @return com.gic.api.base.commons.ServiceResponse<com.gic.enterprise.dto.TodoItemDTO>
* @throws
*/
ServiceResponse
<
TodoItemDTO
>
getTodoItem
(
Integer
todoItemId
);
/**
* 查询未完成的个数
* @Title: getUnFinishCount
* @Description:
* @author zhiwj
* @param todoItemQO
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Integer>
* @throws
*/
ServiceResponse
<
Integer
>
getUnFinishCount
(
TodoItemQO
todoItemQO
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/dao/mapper/TabTodoItemMapper.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
dao
.
mapper
;
import
com.gic.enterprise.entity.TabTodoItem
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.github.pagehelper.Page
;
import
org.apache.ibatis.annotations.Param
;
/**
*
* @ClassName: TabTodoItemMapper
* @Description:
* @author taogs
* @date 2020/9/11 16:21
*/
public
interface
TabTodoItemMapper
{
/**
* 插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insert
(
TabTodoItem
record
);
/**
* 动态插入一条记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
insertSelective
(
TabTodoItem
record
);
/**
* 根据主键查询
*
* @param todoItemId 主键
* @return 实体对象
*/
TabTodoItem
selectByPrimaryKey
(
Integer
todoItemId
);
/**
* 根据主键动态更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKeySelective
(
TabTodoItem
record
);
/**
* 根据主键更新记录
*
* @param record 实体对象
* @return 更新条目数
*/
int
updateByPrimaryKey
(
TabTodoItem
record
);
/**
* getBySelective
* @Title: getBySelective
* @Description:
* @author taogs
* @param enterpriseId
* @param userId
* @param itemType
* @param itemInfoUrl
* @return com.gic.enterprise.entity.TabTodoItem
* @throws
*/
TabTodoItem
getBySelective
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"itemType"
)
String
itemType
,
@Param
(
"itemInfoUrl"
)
String
itemInfoUrl
);
/**
* finishTodoItem
* @Title: finishTodoItem
* @Description:
* @author taogs
* @param enterpriseId
* @param userId
* @param itemType
* @param itemInfoUrl
* @return int
* @throws
*/
int
finishTodoItem
(
@Param
(
"enterpriseId"
)
Integer
enterpriseId
,
@Param
(
"userId"
)
Integer
userId
,
@Param
(
"itemType"
)
String
itemType
,
@Param
(
"itemInfoUrl"
)
String
itemInfoUrl
);
/**
* listTodoItem
* @Title: listTodoItem
* @Description:
* @author taogs
* @param todoItemQO
* @return com.github.pagehelper.Page<com.gic.enterprise.entity.TabTodoItem>
* @throws
*/
Page
<
TabTodoItem
>
listTodoItem
(
TodoItemQO
todoItemQO
);
/**
* getUnFinishCount
* @Title: getUnFinishCount
* @Description:
* @author taogs
* @param todoItemQO
* @return java.lang.Integer
* @throws
*/
Integer
getUnFinishCount
(
TodoItemQO
todoItemQO
);
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/entity/TabTodoItem.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
entity
;
import
java.util.Date
;
/**
*
* @ClassName: TabTodoItem
* @Description:
* @author taogs
* @date 2020/9/11 16:21
*/
public
class
TabTodoItem
{
/**
*
*/
private
Integer
todoItemId
;
/**
*
*/
private
Integer
enterpriseId
;
/**
*
*/
private
Integer
userId
;
/**
* 事项内容
*/
private
String
itemContent
;
/**
* 0:待处理 1:未完成
*/
private
Integer
finish
;
/**
* 事项类型 (字典的code)
*/
private
String
itemType
;
/**
* 完成时间
*/
private
Date
finishTime
;
/**
*
*/
private
Date
createTime
;
/**
*
*/
private
Date
updateTime
;
/**
*
*/
private
Integer
deleteFlag
;
/**
* 存事项的需要反查的内容,url
*/
private
String
itemInfoUrl
;
public
Integer
getTodoItemId
()
{
return
todoItemId
;
}
public
void
setTodoItemId
(
Integer
todoItemId
)
{
this
.
todoItemId
=
todoItemId
;
}
public
Integer
getEnterpriseId
()
{
return
enterpriseId
;
}
public
void
setEnterpriseId
(
Integer
enterpriseId
)
{
this
.
enterpriseId
=
enterpriseId
;
}
public
Integer
getUserId
()
{
return
userId
;
}
public
void
setUserId
(
Integer
userId
)
{
this
.
userId
=
userId
;
}
public
String
getItemContent
()
{
return
itemContent
;
}
public
void
setItemContent
(
String
itemContent
)
{
this
.
itemContent
=
itemContent
;
}
public
Integer
getFinish
()
{
return
finish
;
}
public
void
setFinish
(
Integer
finish
)
{
this
.
finish
=
finish
;
}
public
String
getItemType
()
{
return
itemType
;
}
public
void
setItemType
(
String
itemType
)
{
this
.
itemType
=
itemType
;
}
public
Date
getFinishTime
()
{
return
finishTime
;
}
public
void
setFinishTime
(
Date
finishTime
)
{
this
.
finishTime
=
finishTime
;
}
public
Date
getCreateTime
()
{
return
createTime
;
}
public
void
setCreateTime
(
Date
createTime
)
{
this
.
createTime
=
createTime
;
}
public
Date
getUpdateTime
()
{
return
updateTime
;
}
public
void
setUpdateTime
(
Date
updateTime
)
{
this
.
updateTime
=
updateTime
;
}
public
Integer
getDeleteFlag
()
{
return
deleteFlag
;
}
public
TabTodoItem
setDeleteFlag
(
Integer
deleteFlag
)
{
this
.
deleteFlag
=
deleteFlag
;
return
this
;
}
public
String
getItemInfoUrl
()
{
return
itemInfoUrl
;
}
public
void
setItemInfoUrl
(
String
itemInfoUrl
)
{
this
.
itemInfoUrl
=
itemInfoUrl
;
}
}
\ No newline at end of file
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/TodoItemService.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
service
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.entity.TabTodoItem
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.github.pagehelper.Page
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 17:20
*/
public
interface
TodoItemService
{
/**
* save
* @Title: save
* @Description:
* @author taogs
* @param todoItemDTO
* @return void
* @throws
*/
void
save
(
TodoItemDTO
todoItemDTO
);
/**
* getByItemInfoUrl
* @Title: getByItemInfoUrl
* @Description:
* @author taogs
* @param enterpriseId
* @param userId
* @param itemType
* @param itemInfoUrl
* @return com.gic.enterprise.entity.TabTodoItem
* @throws
*/
TabTodoItem
getByItemInfoUrl
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
);
/**
* finishTodoItem
* @Title: finishTodoItem
* @Description:
* @author taogs
* @param enterpriseId
* @param userId
* @param itemType
* @param itemInfoUrl
* @return int
* @throws
*/
int
finishTodoItem
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
);
/**
* listTodoItem
* @Title: listTodoItem
* @Description:
* @author taogs
* @param todoItemQO
* @return com.github.pagehelper.Page<com.gic.enterprise.entity.TabTodoItem>
* @throws
*/
Page
<
TabTodoItem
>
listTodoItem
(
TodoItemQO
todoItemQO
);
/**
* getUnFinishCount
* @Title: getUnFinishCount
* @Description:
* @author taogs
* @param todoItemQO
* @return java.lang.Integer
* @throws
*/
Integer
getUnFinishCount
(
TodoItemQO
todoItemQO
);
/**
* getById
* @Title: getById
* @Description:
* @author taogs
* @param todoItemId
* @return com.gic.enterprise.entity.TabTodoItem
* @throws
*/
TabTodoItem
getById
(
Integer
todoItemId
);
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/BillingAccountServiceImpl.java
View file @
2bc266b5
package
com
.
gic
.
enterprise
.
service
.
impl
;
package
com
.
gic
.
enterprise
.
service
.
impl
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.dao.mapper.TabBillingAccountMapper
;
import
com.gic.enterprise.dao.mapper.TabBillingAccountMapper
;
import
com.gic.enterprise.entity.TabBillingAccount
;
import
com.gic.enterprise.entity.TabBillingAccount
;
import
com.gic.enterprise.service.BillingAccountService
;
import
com.gic.enterprise.service.BillingAccountService
;
import
com.gic.enterprise.service.TodoItemService
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.apache.logging.log4j.Logger
;
...
@@ -32,8 +30,6 @@ public class BillingAccountServiceImpl implements BillingAccountService{
...
@@ -32,8 +30,6 @@ public class BillingAccountServiceImpl implements BillingAccountService{
@Autowired
@Autowired
private
TabBillingAccountMapper
tabBillingAccountMapper
;
private
TabBillingAccountMapper
tabBillingAccountMapper
;
@Autowired
@Autowired
private
TodoItemService
todoItemService
;
@Autowired
private
UserApiService
userApiService
;
private
UserApiService
userApiService
;
@Autowired
@Autowired
private
Config
config
;
private
Config
config
;
...
@@ -60,8 +56,6 @@ public class BillingAccountServiceImpl implements BillingAccountService{
...
@@ -60,8 +56,6 @@ public class BillingAccountServiceImpl implements BillingAccountService{
TabBillingAccount
tabBillingAccount
=
tabBillingAccountMapper
.
selectByEnterpriseId
(
enterpriseId
);
TabBillingAccount
tabBillingAccount
=
tabBillingAccountMapper
.
selectByEnterpriseId
(
enterpriseId
);
double
newTotal
=
tabBillingAccount
.
getAccountBalance
()
+
totalFee
;
double
newTotal
=
tabBillingAccount
.
getAccountBalance
()
+
totalFee
;
logger
.
info
(
"商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}"
,
enterpriseId
,
tabBillingAccount
.
getAccountBalance
(),
totalFee
,
newTotal
);
logger
.
info
(
"商户:{}, 充值/退款前余额:{}, 充值/退款金额:{}, 充值/退款后余额:{}"
,
enterpriseId
,
tabBillingAccount
.
getAccountBalance
(),
totalFee
,
newTotal
);
UserDTO
user
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
).
getResult
();
todoItemService
.
finishTodoItem
(
enterpriseId
,
user
.
getUserId
(),
Constants
.
PRODUCT
,
config
.
getHost
()
+
Constants
.
TODO_ITEM_ACCOUNT_BALANCE_URL
);
return
tabBillingAccountMapper
.
updateAccountAfterRechargeOrRefund
(
totalFee
,
enterpriseId
);
return
tabBillingAccountMapper
.
updateAccountAfterRechargeOrRefund
(
totalFee
,
enterpriseId
);
}
}
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/impl/TodoItemServiceImpl.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
service
.
impl
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.GlobalInfo
;
import
com.gic.enterprise.constant.DeleteFlagConstants
;
import
com.gic.enterprise.dao.mapper.TabTodoItemMapper
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.entity.TabTodoItem
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.gic.enterprise.service.TodoItemService
;
import
com.github.pagehelper.Page
;
import
com.github.pagehelper.PageHelper
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.Date
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 17:21
*/
@Service
public
class
TodoItemServiceImpl
implements
TodoItemService
{
@Autowired
private
TabTodoItemMapper
tabTodoItemMapper
;
@Override
public
void
save
(
TodoItemDTO
todoItemDTO
)
{
TabTodoItem
tabTodoItem
=
EntityUtil
.
changeEntityByJSON
(
TabTodoItem
.
class
,
todoItemDTO
);
tabTodoItem
.
setFinish
(
0
);
tabTodoItem
.
setCreateTime
(
new
Date
());
tabTodoItem
.
setDeleteFlag
(
DeleteFlagConstants
.
NORMAL_STATUS
);
tabTodoItemMapper
.
insertSelective
(
tabTodoItem
);
}
@Override
public
TabTodoItem
getByItemInfoUrl
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
)
{
return
tabTodoItemMapper
.
getBySelective
(
enterpriseId
,
userId
,
itemType
,
itemInfoUrl
);
}
@Override
public
int
finishTodoItem
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
)
{
return
tabTodoItemMapper
.
finishTodoItem
(
enterpriseId
,
userId
,
itemType
,
itemInfoUrl
);
}
@Override
public
Page
<
TabTodoItem
>
listTodoItem
(
TodoItemQO
todoItemQO
)
{
PageHelper
.
startPage
(
todoItemQO
.
getCurrentPage
(),
todoItemQO
.
getPageSize
());
return
tabTodoItemMapper
.
listTodoItem
(
todoItemQO
);
}
@Override
public
Integer
getUnFinishCount
(
TodoItemQO
todoItemQO
)
{
return
tabTodoItemMapper
.
getUnFinishCount
(
todoItemQO
);
}
@Override
public
TabTodoItem
getById
(
Integer
todoItemId
)
{
return
tabTodoItemMapper
.
selectByPrimaryKey
(
todoItemId
);
}
}
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/AuditLogApiServiceImpl.java
View file @
2bc266b5
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSON
;
import
com.alibaba.fastjson.JSONObject
;
import
com.alibaba.fastjson.JSONObject
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.Page
;
...
@@ -14,7 +28,10 @@ import com.gic.enterprise.config.Config;
...
@@ -14,7 +28,10 @@ import com.gic.enterprise.config.Config;
import
com.gic.enterprise.constant.AuditTypeEnum
;
import
com.gic.enterprise.constant.AuditTypeEnum
;
import
com.gic.enterprise.constant.DataSecurityAuditEnum
;
import
com.gic.enterprise.constant.DataSecurityAuditEnum
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.constants.Constants
;
import
com.gic.enterprise.dto.*
;
import
com.gic.enterprise.dto.AuditDownloadDTO
;
import
com.gic.enterprise.dto.AuditLogDTO
;
import
com.gic.enterprise.dto.AuditRiskModeDTO
;
import
com.gic.enterprise.dto.DictDTO
;
import
com.gic.enterprise.entity.*
;
import
com.gic.enterprise.entity.*
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.AuditLogQO
;
import
com.gic.enterprise.qo.AuditLogQO
;
...
@@ -23,19 +40,6 @@ import com.gic.enterprise.service.*;
...
@@ -23,19 +40,6 @@ import com.gic.enterprise.service.*;
import
com.gic.enterprise.utils.AsyncCallbackUtils
;
import
com.gic.enterprise.utils.AsyncCallbackUtils
;
import
com.gic.marketing.process.api.service.tmpl.WxTemplateRouterApiService
;
import
com.gic.marketing.process.api.service.tmpl.WxTemplateRouterApiService
;
import
com.gic.store.utils.valid.ValidUtil
;
import
com.gic.store.utils.valid.ValidUtil
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.logging.log4j.LogManager
;
import
org.apache.logging.log4j.Logger
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
java.util.ArrayList
;
import
java.util.Date
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
/**
*
*
...
@@ -65,8 +69,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
...
@@ -65,8 +69,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
@Autowired
@Autowired
private
DownloadReportService
downloadReportService
;
private
DownloadReportService
downloadReportService
;
@Autowired
@Autowired
private
TodoItemApiService
todoItemApiService
;
@Autowired
private
EnterpriseService
enterpriseService
;
private
EnterpriseService
enterpriseService
;
@Autowired
@Autowired
private
PushMessageApiService
pushMessageApiService
;
private
PushMessageApiService
pushMessageApiService
;
...
@@ -173,27 +175,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
...
@@ -173,27 +175,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
//重制,为了循环新增
//重制,为了循环新增
auditLogDTO
.
setAuditLogId
(
null
);
auditLogDTO
.
setAuditLogId
(
null
);
if
(
auditorDTO
.
getUserId
()
!=
null
&&
!
AuditTypeEnum
.
HAOBAN
.
getCode
().
equals
(
auditLogDTO
.
getAuditType
()))
{
ServiceResponse
<
UserDTO
>
userResponse
=
userApiService
.
getUserInfoById
(
auditorDTO
.
getUserId
());
if
(
userResponse
.
isSuccess
())
{
UserDTO
userDTO
=
userResponse
.
getResult
();
if
(
userDTO
!=
null
)
{
TodoItemDTO
todoItemDTO
=
new
TodoItemDTO
();
// 商户id
todoItemDTO
.
setEnterpriseId
(
userDTO
.
getEnterpriseId
());
// 待办事项的userId
todoItemDTO
.
setUserId
(
userDTO
.
getUserId
());
// 事项详情
todoItemDTO
.
setItemContent
(
projectItem
.
getProjectItemDesc
());
// 事项code
todoItemDTO
.
setItemType
(
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT
);
// 事项url
todoItemDTO
.
setItemInfoUrl
(
config
.
getHost
()
+
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT_URL
+
"?auditLogId="
+
auditLogId
);
todoItemApiService
.
saveTodoItem
(
todoItemDTO
);
}
}
}
}
}
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
if
(
Constants
.
NORMAL_STATUS
.
equals
(
projectItem
.
getIsPlatform
()))
{
// todo 如果是平台审批项, 还要发送给实施 一期先不做
// todo 如果是平台审批项, 还要发送给实施 一期先不做
...
@@ -226,10 +207,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
...
@@ -226,10 +207,6 @@ public class AuditLogApiServiceImpl implements AuditLogApiService {
listBySendRandomId
.
forEach
(
e
->
{
listBySendRandomId
.
forEach
(
e
->
{
// 完成待办事项
todoItemApiService
.
finishTodoItem
(
auditLogDTO
.
getEnterpriseId
(),
e
.
getAuditorId
(),
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT
,
config
.
getHost
()
+
com
.
gic
.
enterprise
.
constant
.
Constants
.
TODO_ITEM_AUDIT_URL
+
"?auditLogId="
+
e
.
getAuditLogId
());
// 记录审批流程
// 记录审批流程
//重置日志主键ID
//重置日志主键ID
auditLogDTO
.
setAuditLogId
(
e
.
getAuditLogId
());
auditLogDTO
.
setAuditLogId
(
e
.
getAuditLogId
());
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/BillingAccountApiServiceImpl.java
View file @
2bc266b5
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.dto.UserDTO
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.auth.service.UserApiService
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.config.Config
;
import
com.gic.enterprise.constant.Constants
;
import
com.gic.enterprise.constant.PackageHoursEnum
;
import
com.gic.enterprise.constant.PackageHoursEnum
;
import
com.gic.enterprise.constant.PayTypeEnum
;
import
com.gic.enterprise.constant.PayTypeEnum
;
import
com.gic.enterprise.constant.billing.AutoRechargeEnum
;
import
com.gic.enterprise.constant.billing.AutoRechargeEnum
;
...
@@ -18,17 +29,6 @@ import com.gic.enterprise.response.EnterpriseServiceResponse;
...
@@ -18,17 +29,6 @@ import com.gic.enterprise.response.EnterpriseServiceResponse;
import
com.gic.enterprise.service.*
;
import
com.gic.enterprise.service.*
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.marketing.process.api.service.sms.SmsSendApiService
;
import
com.gic.redis.data.util.RedisUtil
;
import
com.gic.redis.data.util.RedisUtil
;
import
org.slf4j.Logger
;
import
org.slf4j.LoggerFactory
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.text.SimpleDateFormat
;
import
java.util.Date
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.concurrent.TimeUnit
;
/**
/**
*
*
* @ClassName: BillingAccountApiServiceImpl
* @ClassName: BillingAccountApiServiceImpl
...
@@ -52,8 +52,6 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
...
@@ -52,8 +52,6 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
@Autowired
@Autowired
private
PushMessageApiService
pushMessageApiService
;
private
PushMessageApiService
pushMessageApiService
;
@Autowired
@Autowired
private
TodoItemApiService
todoItemApiService
;
@Autowired
private
UserApiService
userApiService
;
private
UserApiService
userApiService
;
@Autowired
@Autowired
private
BillingOrderApiService
billingOrderApiService
;
private
BillingOrderApiService
billingOrderApiService
;
...
@@ -281,16 +279,12 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
...
@@ -281,16 +279,12 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
String
content
=
"您的达摩账户已欠费, 为避免您的业务受到影响,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
String
content
=
"您的达摩账户已欠费, 为避免您的业务受到影响,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
sendSms
(
enterpriseId
,
"GICJFZX012"
);
sendSms
(
enterpriseId
,
"GICJFZX012"
);
// 待办事项
sendTotoItem
(
enterpriseId
,
"您的达摩账户已欠费"
);
}
else
if
(
account
.
getAccountBalance
()
<
ACCOUNT_NOTICE_LINE
)
{
}
else
if
(
account
.
getAccountBalance
()
<
ACCOUNT_NOTICE_LINE
)
{
Object
cache
=
RedisUtil
.
getCache
(
"insufficientAccountBalanceMessage:"
+
enterpriseId
);
Object
cache
=
RedisUtil
.
getCache
(
"insufficientAccountBalanceMessage:"
+
enterpriseId
);
if
(
cache
==
null
)
{
if
(
cache
==
null
)
{
String
content
=
"您的达摩账户余额已不足1000元,若账户欠费将中断部分正常业务,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
String
content
=
"您的达摩账户余额已不足1000元,若账户欠费将中断部分正常业务,请及时<a href='"
+
config
.
getHost
()
+
"cost-center/billing-center/recharge'>充值</a>"
;
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
this
.
pushMessageApiService
.
pushMessage
(
enterpriseId
,
"系统消息"
,
"商户欠费"
,
content
);
sendSms
(
enterpriseId
,
"GICJFZX001"
);
sendSms
(
enterpriseId
,
"GICJFZX001"
);
// 待办事项
sendTotoItem
(
enterpriseId
,
"您的达摩账户余额已不足1000元"
);
RedisUtil
.
setCache
(
"insufficientAccountBalanceMessage:"
+
enterpriseId
,
1
,
7L
,
TimeUnit
.
DAYS
);
RedisUtil
.
setCache
(
"insufficientAccountBalanceMessage:"
+
enterpriseId
,
1
,
7L
,
TimeUnit
.
DAYS
);
}
}
}
}
...
@@ -309,21 +303,6 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
...
@@ -309,21 +303,6 @@ public class BillingAccountApiServiceImpl implements BillingAccountApiService {
return
this
.
enterpriseWhiteListService
.
getEnterpriseWhiteList
(
enterpriseId
)
!=
null
;
return
this
.
enterpriseWhiteListService
.
getEnterpriseWhiteList
(
enterpriseId
)
!=
null
;
}
}
private
void
sendTotoItem
(
Integer
enterpriseId
,
String
content
)
{
TodoItemDTO
todoItemDTO
=
new
TodoItemDTO
();
UserDTO
userDTO
=
userApiService
.
getUserByEnterpriseId
(
enterpriseId
).
getResult
();
// 商户
todoItemDTO
.
setEnterpriseId
(
enterpriseId
);
// 待办事项的userId
todoItemDTO
.
setUserId
(
userDTO
.
getUserId
());
// 事项详情
todoItemDTO
.
setItemContent
(
content
);
// 事项code 在运维后台字典配置 类目:待办事项类型
todoItemDTO
.
setItemType
(
Constants
.
PRODUCT
);
// 跳转地址 待办事项点击后要跳转的地址
todoItemDTO
.
setItemInfoUrl
(
config
.
getHost
()
+
Constants
.
TODO_ITEM_ACCOUNT_BALANCE_URL
);
todoItemApiService
.
saveTodoItem
(
todoItemDTO
);
}
private
SmsPackageDTO
getSmsPackageDict
(
String
smsCode
)
{
private
SmsPackageDTO
getSmsPackageDict
(
String
smsCode
)
{
ServiceResponse
<
List
<
SmsPackageDTO
>>
list
=
packageApiService
.
listAllSmsPackage
();
ServiceResponse
<
List
<
SmsPackageDTO
>>
list
=
packageApiService
.
listAllSmsPackage
();
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/DictApiServiceImpl.java
View file @
2bc266b5
...
@@ -112,16 +112,6 @@ public class DictApiServiceImpl implements DictApiService {
...
@@ -112,16 +112,6 @@ public class DictApiServiceImpl implements DictApiService {
}
}
@Override
@Override
public
ServiceResponse
<
List
<
DictDTO
>>
listTodoItemType
()
{
List
<
DictDTO
>
result
=
new
ArrayList
<>();
List
<
BizdictDTO
>
list
=
bizdictService
.
treeByCategoryCode
(
Constants
.
TODO_ITEM_TYPE
);
if
(
CollectionUtils
.
isNotEmpty
(
list
)){
result
=
changeListToTree
(
list
);
}
return
ServiceResponse
.
success
(
result
);
}
@Override
public
ServiceResponse
<
List
<
DictDTO
>>
listRequestCode
()
{
public
ServiceResponse
<
List
<
DictDTO
>>
listRequestCode
()
{
List
<
DictDTO
>
result
=
new
ArrayList
<>();
List
<
DictDTO
>
result
=
new
ArrayList
<>();
List
<
BizdictDTO
>
list
=
bizdictService
.
treeByCategoryCode
(
Constants
.
BALANCE_PAY_REQUEST_CODE
);
List
<
BizdictDTO
>
list
=
bizdictService
.
treeByCategoryCode
(
Constants
.
BALANCE_PAY_REQUEST_CODE
);
...
...
gic-platform-enterprise-service/src/main/java/com/gic/enterprise/service/outer/impl/TodoItemApiServiceImpl.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
service
.
outer
.
impl
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.util.EntityUtil
;
import
com.gic.commons.util.PageHelperUtils
;
import
com.gic.enterprise.dto.DictDTO
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.entity.TabTodoItem
;
import
com.gic.enterprise.error.ErrorCode
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.gic.enterprise.response.EnterpriseServiceResponse
;
import
com.gic.enterprise.service.DictApiService
;
import
com.gic.enterprise.service.TodoItemApiService
;
import
com.gic.enterprise.service.TodoItemService
;
import
com.gic.enterprise.utils.valid.ValidParamsUtils
;
import
org.apache.commons.collections.CollectionUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.stream.Collectors
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 17:20
*/
@Service
(
"todoItemApiService"
)
public
class
TodoItemApiServiceImpl
implements
TodoItemApiService
{
@Autowired
private
TodoItemService
todoItemService
;
@Autowired
private
DictApiService
dictApiService
;
@Override
public
ServiceResponse
<
Void
>
saveTodoItem
(
TodoItemDTO
todoItemDTO
)
{
ServiceResponse
serviceResponse
=
ValidParamsUtils
.
allCheckValidate
(
todoItemDTO
,
TodoItemDTO
.
SaveValidView
.
class
);
if
(!
serviceResponse
.
isSuccess
())
{
return
serviceResponse
;
}
TabTodoItem
tabTodoItem
=
todoItemService
.
getByItemInfoUrl
(
todoItemDTO
.
getEnterpriseId
(),
todoItemDTO
.
getUserId
(),
todoItemDTO
.
getItemType
(),
todoItemDTO
.
getItemInfoUrl
());
if
(
tabTodoItem
!=
null
)
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
DATA_EXISTS
);
}
todoItemService
.
save
(
todoItemDTO
);
return
EnterpriseServiceResponse
.
success
();
}
@Override
public
ServiceResponse
<
Void
>
finishTodoItem
(
Integer
enterpriseId
,
Integer
userId
,
String
itemType
,
String
itemInfoUrl
)
{
int
line
=
todoItemService
.
finishTodoItem
(
enterpriseId
,
userId
,
itemType
,
itemInfoUrl
);
if
(
line
>
0
)
{
return
EnterpriseServiceResponse
.
success
();
}
else
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
DATA_EXISTS
);
}
}
@Override
public
ServiceResponse
<
Page
<
TodoItemDTO
>>
listTodoItem
(
TodoItemQO
todoItemQO
)
{
com
.
github
.
pagehelper
.
Page
<
TabTodoItem
>
page
=
this
.
todoItemService
.
listTodoItem
(
todoItemQO
);
Page
<
TodoItemDTO
>
result
=
PageHelperUtils
.
changePageHelperToCurrentPage
(
page
,
TodoItemDTO
.
class
);
if
(
CollectionUtils
.
isNotEmpty
(
page
))
{
List
<
DictDTO
>
list
=
dictApiService
.
listTodoItemType
().
getResult
();
Map
<
String
,
String
>
map
=
list
.
stream
().
collect
(
Collectors
.
toMap
(
DictDTO:
:
getValue
,
DictDTO:
:
getKey
));
for
(
TodoItemDTO
e
:
result
.
getResult
())
{
e
.
setItemTypeName
(
map
.
get
(
e
.
getItemType
()));
}
}
return
EnterpriseServiceResponse
.
success
(
result
);
}
@Override
public
ServiceResponse
<
TodoItemDTO
>
getTodoItem
(
Integer
todoItemId
)
{
TabTodoItem
tabTodoItem
=
this
.
todoItemService
.
getById
(
todoItemId
);
if
(
tabTodoItem
!=
null
)
{
return
EnterpriseServiceResponse
.
success
(
EntityUtil
.
changeEntityByJSON
(
TodoItemDTO
.
class
,
tabTodoItem
));
}
else
{
return
EnterpriseServiceResponse
.
failure
(
ErrorCode
.
NOTEXISTS
);
}
}
@Override
public
ServiceResponse
<
Integer
>
getUnFinishCount
(
TodoItemQO
todoItemQO
)
{
Integer
count
=
this
.
todoItemService
.
getUnFinishCount
(
todoItemQO
);
return
EnterpriseServiceResponse
.
success
(
count
);
}
}
gic-platform-enterprise-service/src/main/resources/dubbo-gic-platform-enterprise-service.xml
View file @
2bc266b5
...
@@ -90,8 +90,6 @@
...
@@ -90,8 +90,6 @@
<dubbo:reference
interface=
"com.gic.member.api.service.MemberInitApiService"
id=
"memberInitApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.member.api.service.MemberInitApiService"
id=
"memberInitApiService"
timeout=
"6000"
/>
<!--首页配置-->
<!--首页配置-->
<dubbo:service
interface=
"com.gic.enterprise.service.IndexModuleApiService"
ref=
"indexModuleApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.enterprise.service.IndexModuleApiService"
ref=
"indexModuleApiService"
timeout=
"6000"
/>
<!--待办事项-->
<dubbo:service
interface=
"com.gic.enterprise.service.TodoItemApiService"
ref=
"todoItemApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.enterprise.service.PushMessageApiService"
ref=
"pushMessageApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.enterprise.service.PushMessageApiService"
ref=
"pushMessageApiService"
timeout=
"6000"
/>
<!--自定义页面装修-->
<!--自定义页面装修-->
<dubbo:service
interface=
"com.gic.enterprise.service.AppletCustomPageApiService"
ref=
"appletCustomPageApiService"
timeout=
"6000"
/>
<dubbo:service
interface=
"com.gic.enterprise.service.AppletCustomPageApiService"
ref=
"appletCustomPageApiService"
timeout=
"6000"
/>
...
...
gic-platform-enterprise-service/src/main/resources/mapper/TabTodoItemMapper.xml
deleted
100644 → 0
View file @
30fd4d46
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper
namespace=
"com.gic.enterprise.dao.mapper.TabTodoItemMapper"
>
<resultMap
id=
"BaseResultMap"
type=
"com.gic.enterprise.entity.TabTodoItem"
>
<id
column=
"todo_item_id"
jdbcType=
"INTEGER"
property=
"todoItemId"
/>
<result
column=
"enterprise_id"
jdbcType=
"INTEGER"
property=
"enterpriseId"
/>
<result
column=
"user_id"
jdbcType=
"INTEGER"
property=
"userId"
/>
<result
column=
"item_content"
jdbcType=
"VARCHAR"
property=
"itemContent"
/>
<result
column=
"finish"
jdbcType=
"INTEGER"
property=
"finish"
/>
<result
column=
"item_type"
jdbcType=
"VARCHAR"
property=
"itemType"
/>
<result
column=
"finish_time"
jdbcType=
"TIMESTAMP"
property=
"finishTime"
/>
<result
column=
"create_time"
jdbcType=
"TIMESTAMP"
property=
"createTime"
/>
<result
column=
"update_time"
jdbcType=
"TIMESTAMP"
property=
"updateTime"
/>
<result
column=
"delete_flag"
jdbcType=
"INTEGER"
property=
"deleteFlag"
/>
<result
column=
"item_info_url"
jdbcType=
"VARCHAR"
property=
"itemInfoUrl"
/>
</resultMap>
<sql
id=
"Base_Column_List"
>
todo_item_id, enterprise_id, user_id, item_content, finish, item_type, finish_time,
create_time, update_time, delete_flag, item_info_url
</sql>
<select
id=
"selectByPrimaryKey"
parameterType=
"java.lang.Integer"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_todo_item
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</select>
<insert
id=
"insert"
parameterType=
"com.gic.enterprise.entity.TabTodoItem"
>
insert into tab_todo_item (todo_item_id, enterprise_id, user_id,
item_content, finish, item_type,
finish_time, create_time, update_time,
delete_flag, item_info_url)
values (#{todoItemId,jdbcType=INTEGER}, #{enterpriseId,jdbcType=INTEGER}, #{userId,jdbcType=INTEGER},
#{itemContent,jdbcType=VARCHAR}, #{finish,jdbcType=INTEGER}, #{itemType,jdbcType=VARCHAR},
#{finishTime,jdbcType=TIMESTAMP}, #{createTime,jdbcType=TIMESTAMP}, #{updateTime,jdbcType=TIMESTAMP},
#{deleteFlag,jdbcType=INTEGER}, #{itemInfoUrl,jdbcType=VARCHAR})
</insert>
<insert
id=
"insertSelective"
parameterType=
"com.gic.enterprise.entity.TabTodoItem"
>
insert into tab_todo_item
<trim
prefix=
"("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"todoItemId != null"
>
todo_item_id,
</if>
<if
test=
"enterpriseId != null"
>
enterprise_id,
</if>
<if
test=
"userId != null"
>
user_id,
</if>
<if
test=
"itemContent != null"
>
item_content,
</if>
<if
test=
"finish != null"
>
finish,
</if>
<if
test=
"itemType != null"
>
item_type,
</if>
<if
test=
"finishTime != null"
>
finish_time,
</if>
<if
test=
"createTime != null"
>
create_time,
</if>
<if
test=
"updateTime != null"
>
update_time,
</if>
<if
test=
"deleteFlag != null"
>
delete_flag,
</if>
<if
test=
"itemInfoUrl != null"
>
item_info_url,
</if>
</trim>
<trim
prefix=
"values ("
suffix=
")"
suffixOverrides=
","
>
<if
test=
"todoItemId != null"
>
#{todoItemId,jdbcType=INTEGER},
</if>
<if
test=
"enterpriseId != null"
>
#{enterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
#{userId,jdbcType=INTEGER},
</if>
<if
test=
"itemContent != null"
>
#{itemContent,jdbcType=VARCHAR},
</if>
<if
test=
"finish != null"
>
#{finish,jdbcType=INTEGER},
</if>
<if
test=
"itemType != null"
>
#{itemType,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
#{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
#{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
#{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteFlag != null"
>
#{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"itemInfoUrl != null"
>
#{itemInfoUrl,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update
id=
"updateByPrimaryKeySelective"
parameterType=
"com.gic.enterprise.entity.TabTodoItem"
>
update tab_todo_item
<set>
<if
test=
"enterpriseId != null"
>
enterprise_id = #{enterpriseId,jdbcType=INTEGER},
</if>
<if
test=
"userId != null"
>
user_id = #{userId,jdbcType=INTEGER},
</if>
<if
test=
"itemContent != null"
>
item_content = #{itemContent,jdbcType=VARCHAR},
</if>
<if
test=
"finish != null"
>
finish = #{finish,jdbcType=INTEGER},
</if>
<if
test=
"itemType != null"
>
item_type = #{itemType,jdbcType=VARCHAR},
</if>
<if
test=
"finishTime != null"
>
finish_time = #{finishTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"createTime != null"
>
create_time = #{createTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"updateTime != null"
>
update_time = #{updateTime,jdbcType=TIMESTAMP},
</if>
<if
test=
"deleteFlag != null"
>
delete_flag = #{deleteFlag,jdbcType=INTEGER},
</if>
<if
test=
"itemInfoUrl != null"
>
item_info_url = #{itemInfoUrl,jdbcType=VARCHAR},
</if>
</set>
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</update>
<update
id=
"updateByPrimaryKey"
parameterType=
"com.gic.enterprise.entity.TabTodoItem"
>
update tab_todo_item
set enterprise_id = #{enterpriseId,jdbcType=INTEGER},
user_id = #{userId,jdbcType=INTEGER},
item_content = #{itemContent,jdbcType=VARCHAR},
finish = #{finish,jdbcType=INTEGER},
item_type = #{itemType,jdbcType=VARCHAR},
finish_time = #{finishTime,jdbcType=TIMESTAMP},
create_time = #{createTime,jdbcType=TIMESTAMP},
update_time = #{updateTime,jdbcType=TIMESTAMP},
delete_flag = #{deleteFlag,jdbcType=INTEGER},
item_info_url = #{itemInfoUrl,jdbcType=VARCHAR}
where todo_item_id = #{todoItemId,jdbcType=INTEGER}
</update>
<select
id=
"getBySelective"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_todo_item
where delete_flag = ${@com.gic.enterprise.constant.DeleteFlagConstants@NORMAL_STATUS}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"itemType != null "
>
and item_type = #{itemType}
</if>
<if
test=
"itemInfoUrl != null and itemInfoUrl != '' "
>
and item_info_url = #{itemInfoUrl}
</if>
limit 1
</select>
<update
id=
"finishTodoItem"
>
update tab_todo_item
set finish = 1, finish_time = now()
where delete_flag = ${@com.gic.enterprise.constant.DeleteFlagConstants@NORMAL_STATUS}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<!-- <if test="userId != null ">
and user_id = #{userId}
</if>-->
<if
test=
"itemType != null "
>
and item_type = #{itemType}
</if>
<if
test=
"itemInfoUrl != null and itemInfoUrl != '' "
>
and item_info_url = #{itemInfoUrl}
</if>
</update>
<select
id=
"listTodoItem"
resultMap=
"BaseResultMap"
>
select
<include
refid=
"Base_Column_List"
/>
from tab_todo_item
where delete_flag = ${@com.gic.enterprise.constant.DeleteFlagConstants@NORMAL_STATUS}
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"finish != null "
>
and finish = #{finish}
</if>
<if
test=
"itemType != null and itemType != '' "
>
and item_type = #{itemType}
</if>
<if
test=
"search != null and search != '' "
>
and item_content like concat('%', #{search}, '%')
</if>
<if
test=
"startTime != null and startTime != '' "
>
and create_time
>
#{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
and create_time
<
#{endTime}
</if>
order by create_time desc
</select>
<select
id=
"getUnFinishCount"
resultType=
"int"
>
select
count(1)
from tab_todo_item
where delete_flag = ${@com.gic.enterprise.constant.DeleteFlagConstants@NORMAL_STATUS}
and finish = 0
<if
test=
"enterpriseId != null "
>
and enterprise_id = #{enterpriseId}
</if>
<if
test=
"userId != null "
>
and user_id = #{userId}
</if>
<if
test=
"finish != null "
>
and finish = #{finish}
</if>
<if
test=
"itemType != null and itemType != '' "
>
and item_type = #{itemType}
</if>
<if
test=
"search != null and search != '' "
>
and search like concat('%', #{search}, '%')
</if>
<if
test=
"startTime != null and startTime != '' "
>
and create_time
>
#{startTime}
</if>
<if
test=
"endTime != null and endTime != '' "
>
and create_time
<
#{endTime}
</if>
</select>
</mapper>
\ No newline at end of file
gic-platform-enterprise-web/src/main/java/com/gic/enterprise/web/controller/TodoItemController.java
deleted
100644 → 0
View file @
30fd4d46
package
com
.
gic
.
enterprise
.
web
.
controller
;
import
com.gic.api.base.commons.Page
;
import
com.gic.api.base.commons.ServiceResponse
;
import
com.gic.commons.webapi.reponse.RestResponse
;
import
com.gic.enterprise.dto.DictDTO
;
import
com.gic.enterprise.dto.TodoItemDTO
;
import
com.gic.enterprise.qo.TodoItemQO
;
import
com.gic.enterprise.service.DictApiService
;
import
com.gic.enterprise.service.TodoItemApiService
;
import
com.gic.enterprise.utils.ResultControllerUtils
;
import
com.gic.enterprise.utils.UserDetailUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.Map
;
/**
*
* @Description:
* @author zhiwj
* @date 2019-11-14 20:06
*/
@RestController
public
class
TodoItemController
{
@Autowired
private
TodoItemApiService
todoItemApiService
;
@Autowired
private
DictApiService
dictApiService
;
@RequestMapping
(
"/list-todo-item"
)
public
RestResponse
listTodoItem
(
TodoItemQO
todoItemQO
)
{
todoItemQO
.
setEnterpriseId
(
UserDetailUtils
.
getUserDetail
().
getEnterpriseId
());
todoItemQO
.
setUserId
(
UserDetailUtils
.
getUserDetail
().
getUserId
());
ServiceResponse
<
Page
<
TodoItemDTO
>>
serviceResponse
=
todoItemApiService
.
listTodoItem
(
todoItemQO
);
Page
<
TodoItemDTO
>
page
=
serviceResponse
.
getResult
();
ServiceResponse
<
Integer
>
unFinishCount
=
todoItemApiService
.
getUnFinishCount
(
todoItemQO
);
Map
<
String
,
Object
>
map
=
new
HashMap
<>();
map
.
put
(
"page"
,
page
);
map
.
put
(
"unFinishCount"
,
unFinishCount
.
getResult
());
return
RestResponse
.
success
(
map
);
}
@RequestMapping
(
"/list-todo-item-type"
)
public
RestResponse
listTodoItemType
()
{
ServiceResponse
<
List
<
DictDTO
>>
serviceResponse
=
dictApiService
.
listTodoItemType
();
return
ResultControllerUtils
.
commonResult
(
serviceResponse
);
}
}
gic-platform-enterprise-web/src/main/resources/dubbo-gic-platform-enterprise-web.xml
View file @
2bc266b5
...
@@ -80,7 +80,6 @@
...
@@ -80,7 +80,6 @@
<dubbo:reference
interface=
"com.gic.enterprise.service.IndexModuleApiService"
id=
"indexModuleApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.IndexModuleApiService"
id=
"indexModuleApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.HelpCenterApiService"
id=
"helpCenterApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.HelpCenterApiService"
id=
"helpCenterApiService"
timeout=
"6000"
/>
<!--待办事项-->
<!--待办事项-->
<dubbo:reference
interface=
"com.gic.enterprise.service.TodoItemApiService"
id=
"todoItemApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.PushMessageApiService"
id=
"pushMessageApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.PushMessageApiService"
id=
"pushMessageApiService"
timeout=
"6000"
/>
<!--自定义页面装修-->
<!--自定义页面装修-->
<dubbo:reference
interface=
"com.gic.enterprise.service.AppletCustomPageApiService"
id=
"appletCustomPageApiService"
timeout=
"6000"
/>
<dubbo:reference
interface=
"com.gic.enterprise.service.AppletCustomPageApiService"
id=
"appletCustomPageApiService"
timeout=
"6000"
/>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment