集成企业微信
This commit is contained in:
parent
da9be8756d
commit
1cedd4b084
@ -17,6 +17,10 @@ public enum OperationLogEnum {
|
|||||||
* 系统用户退出登录
|
* 系统用户退出登录
|
||||||
*/
|
*/
|
||||||
SYSTEM_LOGOUT(1, "i18n_operationLog_systemLogout", "SystemLoginModel", 6, 4),
|
SYSTEM_LOGOUT(1, "i18n_operationLog_systemLogout", "SystemLoginModel", 6, 4),
|
||||||
|
/**
|
||||||
|
* 更新系统配置
|
||||||
|
*/
|
||||||
|
UPDATE_OAM_CONFIG(2, "i18n_operationLog_systemLogout", "SystemLoginModel", 5, 3),
|
||||||
//10-15 OAM菜单管理
|
//10-15 OAM菜单管理
|
||||||
/**
|
/**
|
||||||
* 新增OAM菜单
|
* 新增OAM菜单
|
||||||
@ -25,7 +29,7 @@ public enum OperationLogEnum {
|
|||||||
/**
|
/**
|
||||||
* 修改OAM菜单
|
* 修改OAM菜单
|
||||||
*/
|
*/
|
||||||
UPDATE_OAM_MENU(11, "i18n_operationLog_updateOamMenu", "OamMenuModel", 5, 3),
|
UPDATE_OAM_MENU(11, "i18n_operationLog_updateOamMenu", "OamMenuModel", 4, 3),
|
||||||
/**
|
/**
|
||||||
* 删除OAM菜单
|
* 删除OAM菜单
|
||||||
*/
|
*/
|
||||||
@ -38,7 +42,7 @@ public enum OperationLogEnum {
|
|||||||
/**
|
/**
|
||||||
* 修改系统角色
|
* 修改系统角色
|
||||||
*/
|
*/
|
||||||
UPDATE_OAM_ROLE(17, "i18n_operationLog_updateOamRole", "OamRoleModel", 5, 3),
|
UPDATE_OAM_ROLE(17, "i18n_operationLog_updateOamRole", "OamRoleModel", 4, 3),
|
||||||
/**
|
/**
|
||||||
* 删除系统角色
|
* 删除系统角色
|
||||||
*/
|
*/
|
||||||
@ -51,7 +55,7 @@ public enum OperationLogEnum {
|
|||||||
/**
|
/**
|
||||||
* 修改系统部门
|
* 修改系统部门
|
||||||
*/
|
*/
|
||||||
UPDATE_OAM_DEPT(22, "i18n_operationLog_updateOamDept", "OamDeptModel", 5, 3),
|
UPDATE_OAM_DEPT(22, "i18n_operationLog_updateOamDept", "OamDeptModel", 4, 3),
|
||||||
/**
|
/**
|
||||||
* 删除系统部门
|
* 删除系统部门
|
||||||
*/
|
*/
|
||||||
@ -72,106 +76,7 @@ public enum OperationLogEnum {
|
|||||||
/**
|
/**
|
||||||
* 修改系统用户密码
|
* 修改系统用户密码
|
||||||
*/
|
*/
|
||||||
MODIFY_OAM_STAFF_PASSWORD(29, "i18n_operationLog_updateOamStaffPassword", "OamStaffModel", 5, 3),
|
MODIFY_OAM_STAFF_PASSWORD(29, "i18n_operationLog_updateOamStaffPassword", "OamStaffModel", 6, 4),
|
||||||
//31-35 值班管理
|
|
||||||
/**
|
|
||||||
* 添加值班
|
|
||||||
*/
|
|
||||||
INSERT_OAM_DUTY(31,"i18n_operationLog_insertOamDuty" ,"OamDutyModel" ,6 , 4),
|
|
||||||
/**
|
|
||||||
* 删除值班
|
|
||||||
*/
|
|
||||||
REMOVE_OAM_DUTY(32,"i18n_operationLog_removeOamDuty" ,"OamDutyModel" ,6 , 4),
|
|
||||||
//36-45 任务管理
|
|
||||||
/**
|
|
||||||
* 新增迭代任务
|
|
||||||
*/
|
|
||||||
INSERT_ITERATION_TASK(36, "i18n_operationLog_insertIterationTask", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 领取任务
|
|
||||||
*/
|
|
||||||
CLAIM_TASK(37, "i18n_operationLog_claimTask", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 删除任务
|
|
||||||
*/
|
|
||||||
REMOVE_TASK(38, "i18n_operationLog_removeTask", "OamTaskModel", 5, 3),
|
|
||||||
/**
|
|
||||||
* 添加任务组成员
|
|
||||||
*/
|
|
||||||
INSERT_TASK_STAFF_GROUP(39, "i18n_operationLog_insertTaskStaffGroup", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 更新员工绩点
|
|
||||||
*/
|
|
||||||
UPDATE_STAFF_GRADE_POINT(40, "i18n_operationLog_updateStaffGrandPoint", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 删除任务员工组
|
|
||||||
*/
|
|
||||||
REMOVE_TASK_STAFF_GROUP(41, "i18n_operationLog_removeTaskStaffGroup", "OamTaskModel", 5, 3),
|
|
||||||
/**
|
|
||||||
* 修改任务进度
|
|
||||||
*/
|
|
||||||
UPDATE_TASK_ITEM(42, "i18n_operationLog_updateTaskItem", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 转交任务负责人
|
|
||||||
*/
|
|
||||||
UPDATE_TASK_RESPONSIBLE_STAFF(43, "i18n_operationLog_updateTaskResponsibleStaff", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 新增投诉任务
|
|
||||||
*/
|
|
||||||
INSERT_DEMAND_TASK(44, "i18n_operationLog_insertDemandTask", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 设置审核意见
|
|
||||||
*/
|
|
||||||
SET_TASK_AUDIT_COMMENTS(45,"i18n_operationLog_setTaskAuditComments", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 完成任务
|
|
||||||
*/
|
|
||||||
FINISH_TASK(46,"i18n_operationLog_finishTask", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 新增工单
|
|
||||||
*/
|
|
||||||
INSERT_WORK_ORDER(47,"i18n_operationLog_insertWorkOrder", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 新增工单记录concludeWorkOrder
|
|
||||||
*/
|
|
||||||
INSERT_WORK_ORDER_RECORD(48,"i18n_operationLog_insertWorkOrderRecord", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 工单完结
|
|
||||||
*/
|
|
||||||
CONCLUDE_WORK_ORDER(49,"i18n_operationLog_concludeWorkOrder", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 暂停工单
|
|
||||||
*/
|
|
||||||
PAUSE_WORK_ORDER(50,"i18n_operationLog_concludeWorkOrder", "OamTaskModel", 6, 4),
|
|
||||||
//60-70 报销模块
|
|
||||||
/**
|
|
||||||
* 添加报销申请
|
|
||||||
*/
|
|
||||||
INSERT_REIMBURSE_APPLICATION(60, "i18n_operationLog_concludeWorkOrder", "OamTaskModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 审核员工申请
|
|
||||||
*/
|
|
||||||
AUDIT_STAFF_APPLICATION(62, "i18n_operationLog_auditStaffApplication", "OamFinanceModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 报销驳回
|
|
||||||
*/
|
|
||||||
REIMBURSE_REJECT(63, "i18n_operationLog_reimburseReject", "OamFinanceModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 报销下款
|
|
||||||
*/
|
|
||||||
REIMBURSE_PAY(64, "i18n_operationLog_reimbursePay", "OamFinanceModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 添加报销类型
|
|
||||||
*/
|
|
||||||
INSERT_REIMBURSE_TYPE(65, "i18n_operationLog_insertReimburseType", "OamFinanceModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 修改报销类型
|
|
||||||
*/
|
|
||||||
UPDATE_REIMBURSE_TYPE(66, "i18n_operationLog_updateReimburseType", "OamFinanceModel", 6, 4),
|
|
||||||
/**
|
|
||||||
* 删除报销类型
|
|
||||||
*/
|
|
||||||
REMOVE_REIMBURSE_TYPE(67, "i18n_operationLog_removeReimburseType", "OamFinanceModel", 6, 4),
|
|
||||||
;
|
;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -65,7 +65,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
* @param #(entityVarName) #(tableComment)
|
* @param #(entityVarName) #(tableComment)
|
||||||
* @return {@code true} 添加成功,{@code false} 添加失败
|
* @return {@code true} 添加成功,{@code false} 添加失败
|
||||||
*/
|
*/
|
||||||
@PostMapping("save")
|
@PostMapping("/save")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("保存#(tableComment)")
|
@ApiOperation("保存#(tableComment)")
|
||||||
#end
|
#end
|
||||||
@ -82,7 +82,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
* @param id 主键
|
* @param id 主键
|
||||||
* @return {@code true} 删除成功,{@code false} 删除失败
|
* @return {@code true} 删除成功,{@code false} 删除失败
|
||||||
*/
|
*/
|
||||||
@DeleteMapping("remove/{id}")
|
@DeleteMapping("/remove/{id}")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("根据主键#(tableComment)")
|
@ApiOperation("根据主键#(tableComment)")
|
||||||
#end
|
#end
|
||||||
@ -99,7 +99,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
* @param #(entityVarName) #(tableComment)
|
* @param #(entityVarName) #(tableComment)
|
||||||
* @return {@code true} 更新成功,{@code false} 更新失败
|
* @return {@code true} 更新成功,{@code false} 更新失败
|
||||||
*/
|
*/
|
||||||
@PutMapping("update")
|
@PutMapping("/update")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("根据主键更新#(tableComment)")
|
@ApiOperation("根据主键更新#(tableComment)")
|
||||||
#end
|
#end
|
||||||
@ -115,7 +115,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
*
|
*
|
||||||
* @return 所有数据
|
* @return 所有数据
|
||||||
*/
|
*/
|
||||||
@GetMapping("list")
|
@GetMapping("/list")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("查询所有#(tableComment)")
|
@ApiOperation("查询所有#(tableComment)")
|
||||||
#end
|
#end
|
||||||
@ -132,7 +132,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
* @param id #(tableComment)主键
|
* @param id #(tableComment)主键
|
||||||
* @return #(tableComment)详情
|
* @return #(tableComment)详情
|
||||||
*/
|
*/
|
||||||
@GetMapping("getInfo/{id}")
|
@GetMapping("/getInfo/{id}")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("根据主键获取#(tableComment)")
|
@ApiOperation("根据主键获取#(tableComment)")
|
||||||
#end
|
#end
|
||||||
@ -149,7 +149,7 @@ public class #(table.buildControllerClassName()) #if(controllerConfig.superClass
|
|||||||
* @param page 分页对象
|
* @param page 分页对象
|
||||||
* @return 分页对象
|
* @return 分页对象
|
||||||
*/
|
*/
|
||||||
@GetMapping("page")
|
@GetMapping("/page")
|
||||||
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
#if(withSwagger && swaggerVersion.getName() == "FOX")
|
||||||
@ApiOperation("分页查询#(tableComment)")
|
@ApiOperation("分页查询#(tableComment)")
|
||||||
#end
|
#end
|
||||||
|
|||||||
@ -12,7 +12,7 @@ import com.cpop.jambox.business.entity.CardTemplate;
|
|||||||
import com.cpop.jambox.business.mapper.CardTemplateMapper;
|
import com.cpop.jambox.business.mapper.CardTemplateMapper;
|
||||||
import com.cpop.jambox.business.service.CardTemplateService;
|
import com.cpop.jambox.business.service.CardTemplateService;
|
||||||
import com.cpop.jambox.business.vo.CardTemplateListVo;
|
import com.cpop.jambox.business.vo.CardTemplateListVo;
|
||||||
import com.cpop.sdk.framework.handler.QCloudCosHandler;
|
import com.cpop.sdk.framework.handler.qCloudCos.QCloudCosHandler;
|
||||||
import me.chanjar.weixin.common.error.WxErrorException;
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|||||||
@ -30,6 +30,7 @@ i18n_sysLog_pgPoolLog=PgPool Log
|
|||||||
#\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F
|
#\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F
|
||||||
i18n_operationLog_systemLogin=System User Login
|
i18n_operationLog_systemLogin=System User Login
|
||||||
i18n_operationLog_systemLogout=System User Logout
|
i18n_operationLog_systemLogout=System User Logout
|
||||||
|
i18n_operationLog_updateOamConfig=Update System Config
|
||||||
i18n_operationLog_insertOamMenu=Insert Oam Menu
|
i18n_operationLog_insertOamMenu=Insert Oam Menu
|
||||||
i18n_operationLog_updateOamMenu=Update Oam Menu
|
i18n_operationLog_updateOamMenu=Update Oam Menu
|
||||||
i18n_operationLog_removeOamMenu=Remove Oam Menu
|
i18n_operationLog_removeOamMenu=Remove Oam Menu
|
||||||
@ -43,29 +44,6 @@ i18n_operationLog_insertOamStaff=Insert Oam User
|
|||||||
i18n_operationLog_updateOamStaff=Update Oam User
|
i18n_operationLog_updateOamStaff=Update Oam User
|
||||||
i18n_operationLog_removeOamStaff=Remove Oam User
|
i18n_operationLog_removeOamStaff=Remove Oam User
|
||||||
i18n_operationLog_updateOamStaffPassword=Update Oam Staff Password
|
i18n_operationLog_updateOamStaffPassword=Update Oam Staff Password
|
||||||
i18n_operationLog_insertOamDuty=Insert Oam Duty
|
|
||||||
i18n_operationLog_removeOamDuty=Remove Oam Duty
|
|
||||||
i18n_operationLog_insertIterationTask=Insert Iteration Task
|
|
||||||
i18n_operationLog_setTaskAuditComments=Set Task Audit Comments
|
|
||||||
i18n_operationLog_claimTask=Claim Duty
|
|
||||||
i18n_operationLog_removeTask=Remove Task
|
|
||||||
i18n_operationLog_insertTaskStaffGroup=Insert Task Staff Group
|
|
||||||
i18n_operationLog_updateStaffGrandPoint=Update Staff Grand Point
|
|
||||||
i18n_operationLog_removeTaskStaffGroup=Remove Task Staff Group
|
|
||||||
i18n_operationLog_updateTaskItem=Update Task Item
|
|
||||||
i18n_operationLog_updateTaskResponsibleStaff=Update Task Responsible Staff
|
|
||||||
i18n_operationLog_insertDemandTask=Insert Demand Task
|
|
||||||
i18n_operationLog_insertWorkOrder=Insert Work Order
|
|
||||||
i18n_operationLog_finishTask=Finish Task
|
|
||||||
i18n_operationLog_insertWorkOrderRecord=Insert Work Order Record
|
|
||||||
i18n_operationLog_concludeWorkOrder=Conclude Work Order
|
|
||||||
i18n_operationLog_pauseWorkOrder=Pause Work Order
|
|
||||||
i18n_operationLog_insertReimburseType=Insert Reimburse Type
|
|
||||||
i18n_operationLog_updateReimburseType=Update Reimburse Type
|
|
||||||
i18n_operationLog_removeReimburseType=Remove Reimburse Type
|
|
||||||
i18n_operationLog_auditStaffApplication=Audit Staff Application
|
|
||||||
i18n_operationLog_reimburseReject=Reimburse Reject
|
|
||||||
i18n_operationLog_reimbursePay=Reimburse Pay
|
|
||||||
|
|
||||||
#\u7CFB\u7EDF\u63D0\u793A\u4FE1\u606F
|
#\u7CFB\u7EDF\u63D0\u793A\u4FE1\u606F
|
||||||
i18n_alert_accountOrPwdError=Username or password is wrong!
|
i18n_alert_accountOrPwdError=Username or password is wrong!
|
||||||
|
|||||||
@ -30,6 +30,7 @@ i18n_sysLog_pgPoolLog=pgPool\u65E5\u5FD7
|
|||||||
#\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F
|
#\u64CD\u4F5C\u65E5\u5FD7\u4FE1\u606F
|
||||||
i18n_operationLog_systemLogin=\u7CFB\u7EDF\u7528\u6237\u767B\u5F55
|
i18n_operationLog_systemLogin=\u7CFB\u7EDF\u7528\u6237\u767B\u5F55
|
||||||
i18n_operationLog_systemLogout=\u7CFB\u7EDF\u7528\u6237\u9000\u51FA
|
i18n_operationLog_systemLogout=\u7CFB\u7EDF\u7528\u6237\u9000\u51FA
|
||||||
|
i18n_operationLog_updateOamConfig=\u4FEE\u6539\u7CFB\u7EDF\u914D\u7F6E
|
||||||
i18n_operationLog_insertOamMenu=\u6DFB\u52A0OAM\u83DC\u5355
|
i18n_operationLog_insertOamMenu=\u6DFB\u52A0OAM\u83DC\u5355
|
||||||
i18n_operationLog_updateOamMenu=\u4FEE\u6539OAM\u83DC\u5355
|
i18n_operationLog_updateOamMenu=\u4FEE\u6539OAM\u83DC\u5355
|
||||||
i18n_operationLog_removeOamMenu=\u5220\u9664OAM\u83DC\u5355
|
i18n_operationLog_removeOamMenu=\u5220\u9664OAM\u83DC\u5355
|
||||||
@ -43,29 +44,6 @@ i18n_operationLog_insertOamStaff=\u6DFB\u52A0OAM\u7528\u6237
|
|||||||
i18n_operationLog_updateOamStaff=\u4FEE\u6539OAM\u7528\u6237
|
i18n_operationLog_updateOamStaff=\u4FEE\u6539OAM\u7528\u6237
|
||||||
i18n_operationLog_removeOamStaff=\u5220\u9664OAM\u7528\u6237
|
i18n_operationLog_removeOamStaff=\u5220\u9664OAM\u7528\u6237
|
||||||
i18n_operationLog_updateOamStaffPassword=\u4FEE\u6539OAM\u7528\u6237\u5BC6\u7801
|
i18n_operationLog_updateOamStaffPassword=\u4FEE\u6539OAM\u7528\u6237\u5BC6\u7801
|
||||||
i18n_operationLog_insertOamDuty=\u6DFB\u52A0OAM\u503C\u73ED
|
|
||||||
i18n_operationLog_removeOamDuty=\u5220\u9664OAM\u503C\u73ED
|
|
||||||
i18n_operationLog_insertIterationTask=\u6DFB\u52A0\u8FED\u4EE3\u4EFB\u52A1
|
|
||||||
i18n_operationLog_setTaskAuditComments=\u8BBE\u7F6E\u5BA1\u6838\u610F\u89C1
|
|
||||||
i18n_operationLog_claimTask=\u9886\u53D6\u4EFB\u52A1
|
|
||||||
i18n_operationLog_removeTask=\u5220\u9664\u4EFB\u52A1
|
|
||||||
i18n_operationLog_insertTaskStaffGroup=\u65B0\u589E\u4EFB\u52A1\u5458\u5DE5\u7EC4
|
|
||||||
i18n_operationLog_updateStaffGrandPoint=\u66F4\u65B0\u5458\u5DE5\u7EE9\u70B9
|
|
||||||
i18n_operationLog_removeTaskStaffGroup=\u5220\u9664\u5458\u5DE5\u4EFB\u52A1\u7EC4
|
|
||||||
i18n_operationLog_updateTaskItem=\u66F4\u65B0\u4EFB\u52A1\u8FDB\u5EA6
|
|
||||||
i18n_operationLog_updateTaskResponsibleStaff=\u66F4\u65B0\u4EFB\u52A1\u8D1F\u8D23\u4EBA
|
|
||||||
i18n_operationLog_insertDemandTask=\u65B0\u589E\u9700\u6C42\u4EFB\u52A1
|
|
||||||
i18n_operationLog_insertWorkOrder=\u65B0\u589E\u5DE5\u5355
|
|
||||||
i18n_operationLog_finishTask=\u5B8C\u6210\u4EFB\u52A1
|
|
||||||
i18n_operationLog_insertWorkOrderRecord=\u65B0\u589E\u5DE5\u5355\u8BB0\u5F55
|
|
||||||
i18n_operationLog_concludeWorkOrder=\u5B8C\u6210\u5DE5\u5355
|
|
||||||
i18n_operationLog_pauseWorkOrder=\u6682\u505C\u5DE5\u5355
|
|
||||||
i18n_operationLog_insertReimburseType=\u6DFB\u52A0\u62A5\u9500\u7C7B\u578B
|
|
||||||
i18n_operationLog_updateReimburseType=\u4FEE\u6539\u62A5\u9500\u7C7B\u578B
|
|
||||||
i18n_operationLog_removeReimburseType=\u5220\u9664\u62A5\u9500\u7C7B\u578B
|
|
||||||
i18n_operationLog_auditStaffApplication=\u5BA1\u6838\u5458\u5DE5\u7533\u8BF7
|
|
||||||
i18n_operationLog_reimburseReject=\u62A5\u9500\u62D2\u7EDD
|
|
||||||
i18n_operationLog_reimbursePay=\u62A5\u9500\u4E0B\u6B3E
|
|
||||||
|
|
||||||
#\u7CFB\u7EDF\u63D0\u793A\u4FE1\u606F
|
#\u7CFB\u7EDF\u63D0\u793A\u4FE1\u606F
|
||||||
i18n_alert_accountOrPwdError=\u8D26\u53F7\u6216\u5BC6\u7801\u9519\u8BEF\uFF01
|
i18n_alert_accountOrPwdError=\u8D26\u53F7\u6216\u5BC6\u7801\u9519\u8BEF\uFF01
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.jambox.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.cpop.core.base.R;
|
import com.cpop.core.base.R;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.jambox.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
@ -49,6 +49,7 @@ public class BrandStaffController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/6/2 14:01
|
* @Date: 2023/6/2 14:01
|
||||||
**/
|
**/
|
||||||
|
@PreAuthorize("@aps.hasPermission('brandAndCampus:brandStaff:list')")
|
||||||
@ApiOperation("查询品牌管理员分页列表")
|
@ApiOperation("查询品牌管理员分页列表")
|
||||||
@GetMapping("/getBrandStaffPage")
|
@GetMapping("/getBrandStaffPage")
|
||||||
public R<Page<BrandStaffPageVo>> getBrandStaffPage(BrandStaffPageBo bo) {
|
public R<Page<BrandStaffPageVo>> getBrandStaffPage(BrandStaffPageBo bo) {
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.jambox.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import com.mybatisflex.core.query.QueryWrapper;
|
import com.mybatisflex.core.query.QueryWrapper;
|
||||||
@ -1,8 +1,6 @@
|
|||||||
package com.cpop.oam.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.cpop.core.annontation.OperationLog;
|
|
||||||
import com.cpop.core.base.R;
|
import com.cpop.core.base.R;
|
||||||
import com.cpop.core.base.enums.OperationLogEnum;
|
|
||||||
import com.cpop.oam.business.bo.DutyBo;
|
import com.cpop.oam.business.bo.DutyBo;
|
||||||
import com.cpop.oam.business.bo.DutyListBo;
|
import com.cpop.oam.business.bo.DutyListBo;
|
||||||
import com.cpop.oam.business.service.DutyService;
|
import com.cpop.oam.business.service.DutyService;
|
||||||
@ -57,7 +55,6 @@ public class DutyController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/18 9:50
|
* @Date: 2023/5/18 9:50
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_OAM_DUTY)
|
|
||||||
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:insert')")
|
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:insert')")
|
||||||
@ApiOperation("新增值班")
|
@ApiOperation("新增值班")
|
||||||
@PostMapping("/insertDuty")
|
@PostMapping("/insertDuty")
|
||||||
@ -73,7 +70,6 @@ public class DutyController {
|
|||||||
* @param dutyDate 值班日期
|
* @param dutyDate 值班日期
|
||||||
* @return com.pupu.core.base.R<java.lang.Void>
|
* @return com.pupu.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.REMOVE_OAM_DUTY)
|
|
||||||
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:remove')")
|
@PreAuthorize("@aps.hasPermission('dutyCalendar:duty:remove')")
|
||||||
@ApiOperation("删除值班信息")
|
@ApiOperation("删除值班信息")
|
||||||
@DeleteMapping("/removeDutyByDate/{dutyDate}")
|
@DeleteMapping("/removeDutyByDate/{dutyDate}")
|
||||||
|
|||||||
@ -122,7 +122,6 @@ public class FinanceReimburseController {
|
|||||||
* @param bo 请求参数
|
* @param bo 请求参数
|
||||||
* @return com.pupu.core.base.R<java.lang.Void>
|
* @return com.pupu.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_REIMBURSE_TYPE)
|
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:insert')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:insert')")
|
||||||
@ApiOperation("新增报销类型")
|
@ApiOperation("新增报销类型")
|
||||||
@PostMapping("/insertReimburseType")
|
@PostMapping("/insertReimburseType")
|
||||||
@ -139,7 +138,6 @@ public class FinanceReimburseController {
|
|||||||
* @return com.jambox.core.base.R<java.lang.Void>
|
* @return com.jambox.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
||||||
@OperationLog(operationLogEnumType= OperationLogEnum.UPDATE_REIMBURSE_TYPE)
|
|
||||||
@ApiOperation("修改报销类型")
|
@ApiOperation("修改报销类型")
|
||||||
@PutMapping("/updateReimburseType")
|
@PutMapping("/updateReimburseType")
|
||||||
public R<Void> updateReimburseType(@RequestBody @Validated ReimburseTypeBo bo) {
|
public R<Void> updateReimburseType(@RequestBody @Validated ReimburseTypeBo bo) {
|
||||||
@ -155,7 +153,6 @@ public class FinanceReimburseController {
|
|||||||
* @return com.jambox.core.base.R<java.lang.Void>
|
* @return com.jambox.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:remove')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:remove')")
|
||||||
@OperationLog(operationLogEnumType= OperationLogEnum.REMOVE_REIMBURSE_TYPE)
|
|
||||||
@ApiOperation("删除报销类型")
|
@ApiOperation("删除报销类型")
|
||||||
@DeleteMapping("/removeReimburseTypeById/{id}")
|
@DeleteMapping("/removeReimburseTypeById/{id}")
|
||||||
public R<Void> removeReimburseTypeById(@PathVariable String id) {
|
public R<Void> removeReimburseTypeById(@PathVariable String id) {
|
||||||
@ -181,7 +178,6 @@ public class FinanceReimburseController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/10 16:01
|
* @Date: 2023/5/10 16:01
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType= OperationLogEnum.AUDIT_STAFF_APPLICATION)
|
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
||||||
@ApiOperation("审核员工申请报销")
|
@ApiOperation("审核员工申请报销")
|
||||||
@PutMapping("/auditReimburseApplication/{id}")
|
@PutMapping("/auditReimburseApplication/{id}")
|
||||||
@ -198,7 +194,6 @@ public class FinanceReimburseController {
|
|||||||
* @return com.jambox.core.base.R<java.lang.Void>
|
* @return com.jambox.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
||||||
@OperationLog(operationLogEnumType= OperationLogEnum.REIMBURSE_REJECT)
|
|
||||||
@ApiOperation("报销驳回")
|
@ApiOperation("报销驳回")
|
||||||
@PutMapping("/reimburseReject")
|
@PutMapping("/reimburseReject")
|
||||||
public R<Void> reimburseReject(@RequestBody @Validated ReimburseRejectBo bo) {
|
public R<Void> reimburseReject(@RequestBody @Validated ReimburseRejectBo bo) {
|
||||||
@ -218,7 +213,6 @@ public class FinanceReimburseController {
|
|||||||
* @return com.jambox.core.base.R<java.lang.Void>
|
* @return com.jambox.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
@PreAuthorize("@aps.hasPermission('financial:reimburseAudit:update')")
|
||||||
@OperationLog(operationLogEnumType= OperationLogEnum.REIMBURSE_PAY)
|
|
||||||
@ApiOperation("报销下款")
|
@ApiOperation("报销下款")
|
||||||
@PutMapping("/reimbursePay")
|
@PutMapping("/reimbursePay")
|
||||||
public R<Void> reimbursePay(@RequestBody @Validated ReimbursePayBo bo) {
|
public R<Void> reimbursePay(@RequestBody @Validated ReimbursePayBo bo) {
|
||||||
|
|||||||
@ -37,7 +37,7 @@ public class MenuController {
|
|||||||
* @param bo 请求参数
|
* @param bo 请求参数
|
||||||
* @return com.jambox.core.base.R<java.util.List<OamMenuVo>>
|
* @return com.jambox.core.base.R<java.util.List<OamMenuVo>>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('*:*:*')")
|
@PreAuthorize("@aps.hasPermission('system:menu:list')")
|
||||||
@ApiOperation("获取OAM菜单树列表")
|
@ApiOperation("获取OAM菜单树列表")
|
||||||
@GetMapping("/getOamMenuTreeList")
|
@GetMapping("/getOamMenuTreeList")
|
||||||
public R<List<MenuVo>> getOamMenuTreeList(MenuListBo bo) {
|
public R<List<MenuVo>> getOamMenuTreeList(MenuListBo bo) {
|
||||||
@ -65,7 +65,7 @@ public class MenuController {
|
|||||||
* @param bo 请求参数
|
* @param bo 请求参数
|
||||||
* @return com.jambox.core.base.R<java.lang.Void>
|
* @return com.jambox.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('*:*:*')")
|
@PreAuthorize("@aps.hasPermission('system:menu:insert')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_OAM_MENU)
|
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_OAM_MENU)
|
||||||
@ApiOperation("新增OAM菜单")
|
@ApiOperation("新增OAM菜单")
|
||||||
@PostMapping("/insertOamMenu")
|
@PostMapping("/insertOamMenu")
|
||||||
@ -80,7 +80,7 @@ public class MenuController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/10 16:01
|
* @Date: 2023/5/10 16:01
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('*:*:*')")
|
@PreAuthorize("@aps.hasPermission('system:menu:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_OAM_MENU)
|
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_OAM_MENU)
|
||||||
@ApiOperation("修改OAM菜单")
|
@ApiOperation("修改OAM菜单")
|
||||||
@PutMapping("/updateOamMenu")
|
@PutMapping("/updateOamMenu")
|
||||||
@ -95,7 +95,7 @@ public class MenuController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/10 16:01
|
* @Date: 2023/5/10 16:01
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('*:*:*')")
|
@PreAuthorize("@aps.hasPermission('system:menu:remove')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.REMOVE_OAM_MENU)
|
@OperationLog(operationLogEnumType = OperationLogEnum.REMOVE_OAM_MENU)
|
||||||
@ApiOperation("删除OAM菜单")
|
@ApiOperation("删除OAM菜单")
|
||||||
@DeleteMapping("/removeOamMenu/{id}")
|
@DeleteMapping("/removeOamMenu/{id}")
|
||||||
|
|||||||
@ -53,7 +53,11 @@ public class RoleController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 新增系统角色表
|
* @descriptions 新增角色
|
||||||
|
* @author DB
|
||||||
|
* @date 2023/10/12 10:48
|
||||||
|
* @param bo 请求参数
|
||||||
|
* @return: com.cpop.core.base.R<java.lang.Void>
|
||||||
*/
|
*/
|
||||||
@PreAuthorize("@aps.hasPermission('system:role:insert')")
|
@PreAuthorize("@aps.hasPermission('system:role:insert')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_OAM_ROLE)
|
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_OAM_ROLE)
|
||||||
@ -66,15 +70,13 @@ public class RoleController {
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @Description: 获取系统菜单树列表
|
* @Description: 获取系统菜单树列表
|
||||||
* @param bo 请求参数
|
|
||||||
* @return: R<List<SysMenuVo>>
|
* @return: R<List<SysMenuVo>>
|
||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/10 14:39
|
* @Date: 2023/5/10 14:39
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('system:role:insert')")
|
|
||||||
@ApiOperation("获取菜单树列表")
|
@ApiOperation("获取菜单树列表")
|
||||||
@GetMapping("/getMenuTreeList")
|
@GetMapping("/getFilterAuthMenuTreeList")
|
||||||
public R<List<MenuVo>> getMenuTreeList() {
|
public R<List<MenuVo>> getFilterAuthMenuTreeList() {
|
||||||
List<MenuVo> list = menuService.getFilterAuthMenuTreeList();
|
List<MenuVo> list = menuService.getFilterAuthMenuTreeList();
|
||||||
//过滤掉没有权限的数据
|
//过滤掉没有权限的数据
|
||||||
return R.ok(list);
|
return R.ok(list);
|
||||||
|
|||||||
@ -1,12 +1,15 @@
|
|||||||
package com.cpop.oam.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
|
import com.cpop.core.annontation.OperationLog;
|
||||||
import com.cpop.core.base.R;
|
import com.cpop.core.base.R;
|
||||||
|
import com.cpop.core.base.enums.OperationLogEnum;
|
||||||
import com.cpop.oam.business.bo.SysConfigInfoBo;
|
import com.cpop.oam.business.bo.SysConfigInfoBo;
|
||||||
import com.cpop.oam.business.service.CommonService;
|
import com.cpop.oam.business.service.CommonService;
|
||||||
import com.cpop.oam.business.vo.ConfigInfoVo;
|
import com.cpop.oam.business.vo.ConfigInfoVo;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.security.access.prepost.PreAuthorize;
|
||||||
import org.springframework.validation.annotation.Validated;
|
import org.springframework.validation.annotation.Validated;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
@ -29,6 +32,7 @@ public class SysConfigController {
|
|||||||
* @author DB
|
* @author DB
|
||||||
* @Date: 2023/7/7 0007 16:27
|
* @Date: 2023/7/7 0007 16:27
|
||||||
*/
|
*/
|
||||||
|
@PreAuthorize("@aps.hasPermission('system:config:list')")
|
||||||
@ApiOperation("获取系统配置信息")
|
@ApiOperation("获取系统配置信息")
|
||||||
@GetMapping("/getSysConfigInfo")
|
@GetMapping("/getSysConfigInfo")
|
||||||
public R<ConfigInfoVo> getSysConfigInfo() {
|
public R<ConfigInfoVo> getSysConfigInfo() {
|
||||||
@ -43,6 +47,8 @@ public class SysConfigController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/11 15:48
|
* @Date: 2023/5/11 15:48
|
||||||
**/
|
**/
|
||||||
|
@PreAuthorize("@aps.hasPermission('system:config:update')")
|
||||||
|
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_OAM_CONFIG)
|
||||||
@ApiOperation("设置系统配置信息")
|
@ApiOperation("设置系统配置信息")
|
||||||
@PutMapping("/setSysConfigInfo")
|
@PutMapping("/setSysConfigInfo")
|
||||||
public R<Void> setSysConfigInfo(@RequestBody @Validated SysConfigInfoBo bo) {
|
public R<Void> setSysConfigInfo(@RequestBody @Validated SysConfigInfoBo bo) {
|
||||||
|
|||||||
@ -61,7 +61,6 @@ public class TaskController {
|
|||||||
* @Date: 2023/5/16 15:58
|
* @Date: 2023/5/16 15:58
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:task:insert')")
|
@PreAuthorize("@aps.hasPermission('oamTask:task:insert')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_ITERATION_TASK)
|
|
||||||
@ApiOperation("新增迭代任务")
|
@ApiOperation("新增迭代任务")
|
||||||
@PostMapping("/insertIterationTask")
|
@PostMapping("/insertIterationTask")
|
||||||
public R<Void> insertIterationTask(@RequestBody @Validated TaskBo bo) {
|
public R<Void> insertIterationTask(@RequestBody @Validated TaskBo bo) {
|
||||||
@ -91,7 +90,6 @@ public class TaskController {
|
|||||||
* @Date: 2023/5/16 17:36
|
* @Date: 2023/5/16 17:36
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:taskAudit:update')")
|
@PreAuthorize("@aps.hasPermission('oamTask:taskAudit:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.SET_TASK_AUDIT_COMMENTS)
|
|
||||||
@ApiOperation("设置任务审核意见")
|
@ApiOperation("设置任务审核意见")
|
||||||
@PutMapping("/setTaskAuditComments")
|
@PutMapping("/setTaskAuditComments")
|
||||||
public R<Void> setTaskAuditComments(@RequestBody TaskAuditCommentsBo bo) {
|
public R<Void> setTaskAuditComments(@RequestBody TaskAuditCommentsBo bo) {
|
||||||
@ -121,7 +119,6 @@ public class TaskController {
|
|||||||
* @Date: 2023/5/16 17:10
|
* @Date: 2023/5/16 17:10
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:task:update')")
|
@PreAuthorize("@aps.hasPermission('oamTask:task:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.CLAIM_TASK)
|
|
||||||
@ApiOperation("技术人员领取任务")
|
@ApiOperation("技术人员领取任务")
|
||||||
@PutMapping("/claimTask/{id}")
|
@PutMapping("/claimTask/{id}")
|
||||||
public R<Void> claimTask(@PathVariable String id) {
|
public R<Void> claimTask(@PathVariable String id) {
|
||||||
@ -137,7 +134,6 @@ public class TaskController {
|
|||||||
* @Date: 2023/5/19 18:03
|
* @Date: 2023/5/19 18:03
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:task:remove')")
|
@PreAuthorize("@aps.hasPermission('oamTask:task:remove')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.REMOVE_TASK)
|
|
||||||
@ApiOperation("删除任务")
|
@ApiOperation("删除任务")
|
||||||
@DeleteMapping("/removeTask/{id}")
|
@DeleteMapping("/removeTask/{id}")
|
||||||
public R<Void> removeTask(@PathVariable String id) {
|
public R<Void> removeTask(@PathVariable String id) {
|
||||||
@ -192,7 +188,6 @@ public class TaskController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/16 15:58
|
* @Date: 2023/5/16 15:58
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_TASK_STAFF_GROUP)
|
|
||||||
@ApiOperation("新增任务小组成员")
|
@ApiOperation("新增任务小组成员")
|
||||||
@PostMapping("/insertTaskStaffGroup")
|
@PostMapping("/insertTaskStaffGroup")
|
||||||
public R<Void> insertTaskStaffGroup(@RequestBody @Validated TaskStaffGroupBo bo) {
|
public R<Void> insertTaskStaffGroup(@RequestBody @Validated TaskStaffGroupBo bo) {
|
||||||
@ -207,7 +202,6 @@ public class TaskController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/29 11:48
|
* @Date: 2023/5/29 11:48
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_STAFF_GRADE_POINT)
|
|
||||||
@ApiOperation("修改员工任务绩点")
|
@ApiOperation("修改员工任务绩点")
|
||||||
@PutMapping("/updateStaffGradePoint")
|
@PutMapping("/updateStaffGradePoint")
|
||||||
public R<Void> updateStaffGradePoint(@RequestBody @Validated TaskStaffGroupBo bo) {
|
public R<Void> updateStaffGradePoint(@RequestBody @Validated TaskStaffGroupBo bo) {
|
||||||
@ -222,7 +216,6 @@ public class TaskController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/29 14:18
|
* @Date: 2023/5/29 14:18
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.REMOVE_TASK_STAFF_GROUP)
|
|
||||||
@ApiOperation("删除成员组")
|
@ApiOperation("删除成员组")
|
||||||
@DeleteMapping("/removeTaskStaffGroup/{id}")
|
@DeleteMapping("/removeTaskStaffGroup/{id}")
|
||||||
public R<Void> removeTaskStaffGroup(@PathVariable String id) {
|
public R<Void> removeTaskStaffGroup(@PathVariable String id) {
|
||||||
@ -237,7 +230,6 @@ public class TaskController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/29 14:58
|
* @Date: 2023/5/29 14:58
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_TASK_ITEM)
|
|
||||||
@ApiOperation("修改任务进度")
|
@ApiOperation("修改任务进度")
|
||||||
@PutMapping("/updateTaskItem")
|
@PutMapping("/updateTaskItem")
|
||||||
public R<Void> updateTaskItem(@RequestBody @Validated TaskItemBo bo) {
|
public R<Void> updateTaskItem(@RequestBody @Validated TaskItemBo bo) {
|
||||||
@ -252,7 +244,6 @@ public class TaskController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/29 14:58
|
* @Date: 2023/5/29 14:58
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.UPDATE_TASK_RESPONSIBLE_STAFF)
|
|
||||||
@ApiOperation("修改任务负责人")
|
@ApiOperation("修改任务负责人")
|
||||||
@PutMapping("/updateTaskResponsibleStaff")
|
@PutMapping("/updateTaskResponsibleStaff")
|
||||||
public R<Void> updateTaskResponsibleStaff(@RequestBody @Validated TransferTaskBo bo) {
|
public R<Void> updateTaskResponsibleStaff(@RequestBody @Validated TransferTaskBo bo) {
|
||||||
@ -268,7 +259,6 @@ public class TaskController {
|
|||||||
* @Date: 2023/5/31 16:24
|
* @Date: 2023/5/31 16:24
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:task:update')")
|
@PreAuthorize("@aps.hasPermission('oamTask:task:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.FINISH_TASK)
|
|
||||||
@ApiOperation("完成任务")
|
@ApiOperation("完成任务")
|
||||||
@PutMapping("/finishTask/{id}")
|
@PutMapping("/finishTask/{id}")
|
||||||
public R<Void> finishTask(@PathVariable String id) {
|
public R<Void> finishTask(@PathVariable String id) {
|
||||||
|
|||||||
@ -1,13 +1,11 @@
|
|||||||
package com.cpop.oam.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.mybatisflex.core.paginate.Page;
|
|
||||||
import com.cpop.core.annontation.OperationLog;
|
|
||||||
import com.cpop.core.base.R;
|
import com.cpop.core.base.R;
|
||||||
import com.cpop.core.base.enums.OperationLogEnum;
|
|
||||||
import com.cpop.oam.business.bo.TaskDemandBo;
|
import com.cpop.oam.business.bo.TaskDemandBo;
|
||||||
import com.cpop.oam.business.bo.TaskDemandPageBo;
|
import com.cpop.oam.business.bo.TaskDemandPageBo;
|
||||||
import com.cpop.oam.business.service.TaskDemandService;
|
import com.cpop.oam.business.service.TaskDemandService;
|
||||||
import com.cpop.oam.business.vo.TaskDemandPageVo;
|
import com.cpop.oam.business.vo.TaskDemandPageVo;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -51,7 +49,6 @@ public class TaskDemandController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/30 16:53
|
* @Date: 2023/5/30 16:53
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_DEMAND_TASK)
|
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:taskDemand:insert')")
|
@PreAuthorize("@aps.hasPermission('oamTask:taskDemand:insert')")
|
||||||
@ApiOperation("任务管理模块-新增需求任务")
|
@ApiOperation("任务管理模块-新增需求任务")
|
||||||
@PostMapping("/insertDemandTask")
|
@PostMapping("/insertDemandTask")
|
||||||
|
|||||||
@ -1,9 +1,6 @@
|
|||||||
package com.cpop.oam.business.controller;
|
package com.cpop.oam.business.controller;
|
||||||
|
|
||||||
import com.mybatisflex.core.paginate.Page;
|
|
||||||
import com.cpop.core.annontation.OperationLog;
|
|
||||||
import com.cpop.core.base.R;
|
import com.cpop.core.base.R;
|
||||||
import com.cpop.core.base.enums.OperationLogEnum;
|
|
||||||
import com.cpop.oam.business.bo.PauseWorkOrderBo;
|
import com.cpop.oam.business.bo.PauseWorkOrderBo;
|
||||||
import com.cpop.oam.business.bo.TaskWorkOrderBo;
|
import com.cpop.oam.business.bo.TaskWorkOrderBo;
|
||||||
import com.cpop.oam.business.bo.TaskWorkOrderPageBo;
|
import com.cpop.oam.business.bo.TaskWorkOrderPageBo;
|
||||||
@ -11,6 +8,7 @@ import com.cpop.oam.business.bo.TaskWorkOrderRecordBo;
|
|||||||
import com.cpop.oam.business.service.TaskWorkOrderService;
|
import com.cpop.oam.business.service.TaskWorkOrderService;
|
||||||
import com.cpop.oam.business.vo.TaskWorkOrderPageVo;
|
import com.cpop.oam.business.vo.TaskWorkOrderPageVo;
|
||||||
import com.cpop.oam.business.vo.TaskWorkOrderRecordListVo;
|
import com.cpop.oam.business.vo.TaskWorkOrderRecordListVo;
|
||||||
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@ -41,7 +39,6 @@ public class TaskWorkOrderController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/30 16:53
|
* @Date: 2023/5/30 16:53
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_WORK_ORDER)
|
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:insert')")
|
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:insert')")
|
||||||
@ApiOperation("任务管理模块-工单管理-新增工单")
|
@ApiOperation("任务管理模块-工单管理-新增工单")
|
||||||
@PostMapping("/insertWorkOrder")
|
@PostMapping("/insertWorkOrder")
|
||||||
@ -71,6 +68,7 @@ public class TaskWorkOrderController {
|
|||||||
* @param workRecordId 工单记录id
|
* @param workRecordId 工单记录id
|
||||||
* @return com.cpop.core.base.R<java.util.List<com.cpop.oam.business.vo.TaskWorkOrderRecordListVo>>
|
* @return com.cpop.core.base.R<java.util.List<com.cpop.oam.business.vo.TaskWorkOrderRecordListVo>>
|
||||||
*/
|
*/
|
||||||
|
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:record')")
|
||||||
@ApiOperation("任务管理模块-工单记录")
|
@ApiOperation("任务管理模块-工单记录")
|
||||||
@GetMapping("/getWorkOrderRecordList/{workRecordId}")
|
@GetMapping("/getWorkOrderRecordList/{workRecordId}")
|
||||||
public R<List<TaskWorkOrderRecordListVo>> getWorkOrderRecordList(@PathVariable String workRecordId) {
|
public R<List<TaskWorkOrderRecordListVo>> getWorkOrderRecordList(@PathVariable String workRecordId) {
|
||||||
@ -85,7 +83,6 @@ public class TaskWorkOrderController {
|
|||||||
* @Author: DB
|
* @Author: DB
|
||||||
* @Date: 2023/5/30 16:53
|
* @Date: 2023/5/30 16:53
|
||||||
**/
|
**/
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.INSERT_WORK_ORDER_RECORD)
|
|
||||||
@ApiOperation("任务管理模块-工单管理-新增工单记录")
|
@ApiOperation("任务管理模块-工单管理-新增工单记录")
|
||||||
@PostMapping("/insertWorkOrderRecord")
|
@PostMapping("/insertWorkOrderRecord")
|
||||||
public R<Void> insertWorkOrderRecord(@RequestBody @Validated TaskWorkOrderRecordBo bo) {
|
public R<Void> insertWorkOrderRecord(@RequestBody @Validated TaskWorkOrderRecordBo bo) {
|
||||||
@ -101,7 +98,6 @@ public class TaskWorkOrderController {
|
|||||||
* @Date: 2023/5/16 17:10
|
* @Date: 2023/5/16 17:10
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:update')")
|
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.CONCLUDE_WORK_ORDER)
|
|
||||||
@ApiOperation("工单办结")
|
@ApiOperation("工单办结")
|
||||||
@PutMapping("/concludeWorkOrder/{id}")
|
@PutMapping("/concludeWorkOrder/{id}")
|
||||||
public R<Void> concludeWorkOrder(@PathVariable String id) {
|
public R<Void> concludeWorkOrder(@PathVariable String id) {
|
||||||
@ -117,7 +113,6 @@ public class TaskWorkOrderController {
|
|||||||
* @Date: 2023/5/16 17:10
|
* @Date: 2023/5/16 17:10
|
||||||
**/
|
**/
|
||||||
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:update')")
|
@PreAuthorize("@aps.hasPermission('oamTask:workOrder:update')")
|
||||||
@OperationLog(operationLogEnumType = OperationLogEnum.PAUSE_WORK_ORDER)
|
|
||||||
@ApiOperation("工单暂停")
|
@ApiOperation("工单暂停")
|
||||||
@PutMapping("/pauseWorkOrder")
|
@PutMapping("/pauseWorkOrder")
|
||||||
public R<Void> pauseWorkOrder(@RequestBody PauseWorkOrderBo bo) {
|
public R<Void> pauseWorkOrder(@RequestBody PauseWorkOrderBo bo) {
|
||||||
|
|||||||
@ -10,8 +10,8 @@ import com.cpop.oam.business.bo.WxOpenMaCodeCommitBo;
|
|||||||
import com.cpop.oam.business.bo.WxOpenMaTrialQrCodeBo;
|
import com.cpop.oam.business.bo.WxOpenMaTrialQrCodeBo;
|
||||||
import com.cpop.oam.business.service.WxOpenMiniService;
|
import com.cpop.oam.business.service.WxOpenMiniService;
|
||||||
import com.cpop.oam.business.vo.WxOpenMiniVo;
|
import com.cpop.oam.business.vo.WxOpenMiniVo;
|
||||||
import com.cpop.sdk.framework.config.WxOpenProperties;
|
import com.cpop.sdk.framework.config.wxOpen.WxOpenProperties;
|
||||||
import com.cpop.sdk.framework.handler.WxOpenService;
|
import com.cpop.sdk.framework.handler.wxOpen.WxOpenService;
|
||||||
import com.mybatisflex.core.paginate.Page;
|
import com.mybatisflex.core.paginate.Page;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|||||||
@ -46,7 +46,6 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
|||||||
@Override
|
@Override
|
||||||
public List<MenuVo> getOamMenuTreeList(MenuListBo bo) {
|
public List<MenuVo> getOamMenuTreeList(MenuListBo bo) {
|
||||||
return buildMenuTree(this.listAs(QueryWrapper.create()
|
return buildMenuTree(this.listAs(QueryWrapper.create()
|
||||||
.where(MENU.NAME.isNull().or(MENU.NAME.ne(Constants.HIDE_MENU)))
|
|
||||||
//状态不为空
|
//状态不为空
|
||||||
.and(MENU.STATUS.eq(bo.getStatus()))
|
.and(MENU.STATUS.eq(bo.getStatus()))
|
||||||
//标题不为空
|
//标题不为空
|
||||||
@ -235,13 +234,9 @@ public class MenuServiceImpl extends ServiceImpl<MenuMapper, Menu> implements Me
|
|||||||
|
|
||||||
@Override
|
@Override
|
||||||
public List<MenuVo> getFilterAuthMenuTreeList() {
|
public List<MenuVo> getFilterAuthMenuTreeList() {
|
||||||
List<MenuVo> menuVos = this.listAs(QueryWrapper.create()
|
return buildMenuTree(this.listAs(QueryWrapper.create()
|
||||||
.where(MENU.NAME.isNull().or(MENU.NAME.ne(Constants.HIDE_MENU)))
|
.and(MENU.TYPE.eq(0).or(MENU.TYPE.ne(0).and(MENU.PERMISSION.isNotNull().or(MENU.PERMISSION.eq("")))))
|
||||||
.orderBy(MENU.ORDER_NO.asc()), MenuVo.class);
|
.orderBy(MENU.ORDER_NO.asc()), MenuVo.class));
|
||||||
return buildMenuTree(menuVos.stream()
|
|
||||||
//当类型不为目录的时候,必须要有权限标记
|
|
||||||
.filter(item -> !(item.getType() != 0 && StringUtils.isNotBlank(item.getPermission())))
|
|
||||||
.collect(Collectors.toList()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
@ -28,6 +28,11 @@
|
|||||||
<groupId>com.github.binarywang</groupId>
|
<groupId>com.github.binarywang</groupId>
|
||||||
<artifactId>weixin-java-miniapp</artifactId>
|
<artifactId>weixin-java-miniapp</artifactId>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--企业微信-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.binarywang</groupId>
|
||||||
|
<artifactId>weixin-java-cp</artifactId>
|
||||||
|
</dependency>
|
||||||
<!-- 腾讯云-->
|
<!-- 腾讯云-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.qcloud</groupId>
|
<groupId>com.qcloud</groupId>
|
||||||
|
|||||||
@ -0,0 +1,16 @@
|
|||||||
|
package com.cpop.sdk.framework.builder.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public abstract class AbstractBuilder {
|
||||||
|
protected final Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
|
||||||
|
public abstract WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage, WxCpService service);
|
||||||
|
}
|
||||||
@ -0,0 +1,22 @@
|
|||||||
|
package com.cpop.sdk.framework.builder.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public class ImageBuilder extends AbstractBuilder {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage,
|
||||||
|
WxCpService service) {
|
||||||
|
|
||||||
|
return WxCpXmlOutMessage.IMAGE().mediaId(content)
|
||||||
|
.fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,20 @@
|
|||||||
|
package com.cpop.sdk.framework.builder.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public class TextBuilder extends AbstractBuilder {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage build(String content, WxCpXmlMessage wxMessage,
|
||||||
|
WxCpService service) {
|
||||||
|
return WxCpXmlOutMessage.TEXT().content(content)
|
||||||
|
.fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,128 @@
|
|||||||
|
package com.cpop.sdk.framework.config.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.handler.wxCp.*;
|
||||||
|
import com.google.common.collect.Maps;
|
||||||
|
import lombok.val;
|
||||||
|
import me.chanjar.weixin.common.api.WxConsts;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.api.impl.WxCpServiceImpl;
|
||||||
|
import me.chanjar.weixin.cp.config.impl.WxCpDefaultConfigImpl;
|
||||||
|
import me.chanjar.weixin.cp.constant.WxCpConsts;
|
||||||
|
import me.chanjar.weixin.cp.message.WxCpMessageRouter;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.boot.context.properties.EnableConfigurationProperties;
|
||||||
|
import org.springframework.context.annotation.Configuration;
|
||||||
|
|
||||||
|
import javax.annotation.PostConstruct;
|
||||||
|
import java.util.Map;
|
||||||
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DB
|
||||||
|
* @createTime 2023/10/12 14:10
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Configuration
|
||||||
|
@EnableConfigurationProperties(WxCpProperties.class)
|
||||||
|
public class WxCpConfiguration {
|
||||||
|
|
||||||
|
private LogHandler logHandler;
|
||||||
|
private NullHandler nullHandler;
|
||||||
|
private LocationHandler locationHandler;
|
||||||
|
private MenuHandler menuHandler;
|
||||||
|
private MsgHandler msgHandler;
|
||||||
|
private UnsubscribeHandler unsubscribeHandler;
|
||||||
|
private SubscribeHandler subscribeHandler;
|
||||||
|
private WxCpProperties properties;
|
||||||
|
|
||||||
|
private static Map<Integer, WxCpMessageRouter> routers = Maps.newHashMap();
|
||||||
|
private static Map<Integer, WxCpService> cpServices = Maps.newHashMap();
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
public WxCpConfiguration(LogHandler logHandler, NullHandler nullHandler, LocationHandler locationHandler,
|
||||||
|
MenuHandler menuHandler, MsgHandler msgHandler, UnsubscribeHandler unsubscribeHandler,
|
||||||
|
SubscribeHandler subscribeHandler, WxCpProperties properties) {
|
||||||
|
this.logHandler = logHandler;
|
||||||
|
this.nullHandler = nullHandler;
|
||||||
|
this.locationHandler = locationHandler;
|
||||||
|
this.menuHandler = menuHandler;
|
||||||
|
this.msgHandler = msgHandler;
|
||||||
|
this.unsubscribeHandler = unsubscribeHandler;
|
||||||
|
this.subscribeHandler = subscribeHandler;
|
||||||
|
this.properties = properties;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
public static Map<Integer, WxCpMessageRouter> getRouters() {
|
||||||
|
return routers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public static WxCpService getCpService(Integer agentId) {
|
||||||
|
return cpServices.get(agentId);
|
||||||
|
}
|
||||||
|
|
||||||
|
@PostConstruct
|
||||||
|
public void initServices() {
|
||||||
|
cpServices = this.properties.getAppConfigs().stream().map(a -> {
|
||||||
|
val configStorage = new WxCpDefaultConfigImpl();
|
||||||
|
configStorage.setCorpId(this.properties.getCorpId());
|
||||||
|
configStorage.setAgentId(a.getAgentId());
|
||||||
|
configStorage.setCorpSecret(a.getSecret());
|
||||||
|
configStorage.setToken(a.getToken());
|
||||||
|
configStorage.setAesKey(a.getAesKey());
|
||||||
|
val service = new WxCpServiceImpl();
|
||||||
|
service.setWxCpConfigStorage(configStorage);
|
||||||
|
routers.put(a.getAgentId(), this.newRouter(service));
|
||||||
|
return service;
|
||||||
|
}).collect(Collectors.toMap(service -> service.getWxCpConfigStorage().getAgentId(), item -> item));
|
||||||
|
}
|
||||||
|
|
||||||
|
private WxCpMessageRouter newRouter(WxCpService wxCpService) {
|
||||||
|
val newRouter = new WxCpMessageRouter(wxCpService);
|
||||||
|
|
||||||
|
// 记录所有事件的日志 (异步执行)
|
||||||
|
newRouter.rule().handler(this.logHandler).next();
|
||||||
|
|
||||||
|
// 自定义菜单事件
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.MenuButtonType.CLICK).handler(this.menuHandler).end();
|
||||||
|
|
||||||
|
// 点击菜单链接事件(这里使用了一个空的处理器,可以根据自己需要进行扩展)
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.MenuButtonType.VIEW).handler(this.nullHandler).end();
|
||||||
|
|
||||||
|
// 关注事件
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.EventType.SUBSCRIBE).handler(this.subscribeHandler)
|
||||||
|
.end();
|
||||||
|
|
||||||
|
// 取消关注事件
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.EventType.UNSUBSCRIBE)
|
||||||
|
.handler(this.unsubscribeHandler).end();
|
||||||
|
|
||||||
|
// 上报地理位置事件
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.EventType.LOCATION).handler(this.locationHandler)
|
||||||
|
.end();
|
||||||
|
|
||||||
|
// 接收地理位置消息
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.LOCATION)
|
||||||
|
.handler(this.locationHandler).end();
|
||||||
|
|
||||||
|
// 扫码事件(这里使用了一个空的处理器,可以根据自己需要进行扩展)
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxConsts.EventType.SCAN).handler(this.nullHandler).end();
|
||||||
|
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxCpConsts.EventType.CHANGE_CONTACT).handler(new ContactChangeHandler()).end();
|
||||||
|
|
||||||
|
newRouter.rule().async(false).msgType(WxConsts.XmlMsgType.EVENT)
|
||||||
|
.event(WxCpConsts.EventType.ENTER_AGENT).handler(new EnterAgentHandler()).end();
|
||||||
|
|
||||||
|
// 默认
|
||||||
|
newRouter.rule().async(false).handler(this.msgHandler).end();
|
||||||
|
|
||||||
|
return newRouter;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,56 @@
|
|||||||
|
package com.cpop.sdk.framework.config.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.utils.JsonUtils;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.Getter;
|
||||||
|
import lombok.Setter;
|
||||||
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author DB
|
||||||
|
* @createTime 2023/10/12 14:08
|
||||||
|
* @description
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
@ConfigurationProperties(prefix = "wx.cp")
|
||||||
|
public class WxCpProperties {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置企业微信的corpId
|
||||||
|
*/
|
||||||
|
private String corpId;
|
||||||
|
|
||||||
|
private List<AppConfig> appConfigs;
|
||||||
|
|
||||||
|
@Getter
|
||||||
|
@Setter
|
||||||
|
public static class AppConfig {
|
||||||
|
/**
|
||||||
|
* 设置企业微信应用的AgentId
|
||||||
|
*/
|
||||||
|
private Integer agentId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置企业微信应用的Secret
|
||||||
|
*/
|
||||||
|
private String secret;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置企业微信应用的token
|
||||||
|
*/
|
||||||
|
private String token;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 设置企业微信应用的EncodingAESKey
|
||||||
|
*/
|
||||||
|
private String aesKey;
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String toString() {
|
||||||
|
return JsonUtils.toJson(this);
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.sdk.framework.config;
|
package com.cpop.sdk.framework.config.wxMa;
|
||||||
|
|
||||||
import cn.binarywang.wx.miniapp.api.WxMaService;
|
import cn.binarywang.wx.miniapp.api.WxMaService;
|
||||||
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
|
import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.sdk.framework.config;
|
package com.cpop.sdk.framework.config.wxMa;
|
||||||
|
|
||||||
import lombok.Data;
|
import lombok.Data;
|
||||||
import org.springframework.boot.context.properties.ConfigurationProperties;
|
import org.springframework.boot.context.properties.ConfigurationProperties;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.sdk.framework.config;
|
package com.cpop.sdk.framework.config.wxOpen;
|
||||||
|
|
||||||
import org.apache.commons.lang3.builder.ToStringBuilder;
|
import org.apache.commons.lang3.builder.ToStringBuilder;
|
||||||
import org.apache.commons.lang3.builder.ToStringStyle;
|
import org.apache.commons.lang3.builder.ToStringStyle;
|
||||||
@ -1,4 +1,4 @@
|
|||||||
package com.cpop.sdk.framework.handler;
|
package com.cpop.sdk.framework.handler.qCloudCos;
|
||||||
|
|
||||||
import com.cpop.core.utils.uuid.IdUtils;
|
import com.cpop.core.utils.uuid.IdUtils;
|
||||||
import com.qcloud.cos.COSClient;
|
import com.qcloud.cos.COSClient;
|
||||||
@ -0,0 +1,13 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import org.slf4j.Logger;
|
||||||
|
import org.slf4j.LoggerFactory;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.cp.message.WxCpMessageHandler;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public abstract class AbstractHandler implements WxCpMessageHandler {
|
||||||
|
protected Logger logger = LoggerFactory.getLogger(getClass());
|
||||||
|
}
|
||||||
@ -0,0 +1,30 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.builder.wxCp.TextBuilder;
|
||||||
|
import com.cpop.sdk.framework.utils.JsonUtils;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 通讯录变更事件处理器.
|
||||||
|
*
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class ContactChangeHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
String content = "收到通讯录变更事件,内容:" + JsonUtils.toJson(wxMessage);
|
||||||
|
this.logger.info(content);
|
||||||
|
|
||||||
|
return new TextBuilder().build(content, wxMessage, cpService);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,29 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import lombok.extern.slf4j.Slf4j;
|
||||||
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* <pre>
|
||||||
|
*
|
||||||
|
* Created by Binary Wang on 2018/8/27.
|
||||||
|
* </pre>
|
||||||
|
*
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Slf4j
|
||||||
|
public class EnterAgentHandler extends AbstractHandler {
|
||||||
|
private static final int TEST_AGENT = 1000002;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService wxCpService, WxSessionManager sessionManager) throws WxErrorException {
|
||||||
|
// do something
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.builder.wxCp.TextBuilder;
|
||||||
|
import me.chanjar.weixin.common.api.WxConsts;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class LocationHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
if (wxMessage.getMsgType().equals(WxConsts.XmlMsgType.LOCATION)) {
|
||||||
|
//TODO 接收处理用户发送的地理位置消息
|
||||||
|
try {
|
||||||
|
String content = "感谢反馈,您的的地理位置已收到!";
|
||||||
|
return new TextBuilder().build(content, wxMessage, null);
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.logger.error("位置消息接收处理失败", e);
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
//上报地理位置事件
|
||||||
|
this.logger.info("\n上报地理位置,纬度 : {}\n经度 : {}\n精度 : {}",
|
||||||
|
wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision()));
|
||||||
|
|
||||||
|
//TODO 可以将用户地理位置信息保存到本地数据库,以便以后使用
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,24 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.utils.JsonUtils;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class LogHandler extends AbstractHandler {
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
this.logger.info("\n接收到请求消息,内容:{}", JsonUtils.toJson(wxMessage));
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.common.api.WxConsts.MenuButtonType;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class MenuHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
|
||||||
|
String msg = String.format("type:%s, event:%s, key:%s",
|
||||||
|
wxMessage.getMsgType(), wxMessage.getEvent(),
|
||||||
|
wxMessage.getEventKey());
|
||||||
|
if (MenuButtonType.VIEW.equals(wxMessage.getEvent())) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
return WxCpXmlOutMessage.TEXT().content(msg)
|
||||||
|
.fromUser(wxMessage.getToUserName()).toUser(wxMessage.getFromUserName())
|
||||||
|
.build();
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,39 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.builder.wxCp.TextBuilder;
|
||||||
|
import com.cpop.sdk.framework.utils.JsonUtils;
|
||||||
|
import me.chanjar.weixin.common.api.WxConsts;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class MsgHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
final String msgType = wxMessage.getMsgType();
|
||||||
|
if (msgType == null) {
|
||||||
|
// 如果msgType没有,就自己根据具体报文内容做处理
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!msgType.equals(WxConsts.XmlMsgType.EVENT)) {
|
||||||
|
//TODO 可以选择将消息保存到本地
|
||||||
|
}
|
||||||
|
|
||||||
|
//TODO 组装回复消息
|
||||||
|
String content = "收到信息内容:" + JsonUtils.toJson(wxMessage);
|
||||||
|
|
||||||
|
return new TextBuilder().build(content, wxMessage, cpService);
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class NullHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,8 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public abstract class ScanHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,61 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import com.cpop.sdk.framework.builder.wxCp.TextBuilder;
|
||||||
|
import me.chanjar.weixin.common.error.WxErrorException;
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.WxCpUser;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class SubscribeHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) throws WxErrorException {
|
||||||
|
|
||||||
|
this.logger.info("新关注用户 OPENID: " + wxMessage.getFromUserName());
|
||||||
|
|
||||||
|
// 获取微信用户基本信息
|
||||||
|
WxCpUser userWxInfo = cpService.getUserService().getById(wxMessage.getFromUserName());
|
||||||
|
|
||||||
|
if (userWxInfo != null) {
|
||||||
|
// TODO 可以添加关注用户到本地
|
||||||
|
}
|
||||||
|
|
||||||
|
WxCpXmlOutMessage responseResult = null;
|
||||||
|
try {
|
||||||
|
responseResult = handleSpecial(wxMessage);
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.logger.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (responseResult != null) {
|
||||||
|
return responseResult;
|
||||||
|
}
|
||||||
|
|
||||||
|
try {
|
||||||
|
return new TextBuilder().build("感谢关注", wxMessage, cpService);
|
||||||
|
} catch (Exception e) {
|
||||||
|
this.logger.error(e.getMessage(), e);
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 处理特殊请求,比如如果是扫码进来的,可以做相应处理
|
||||||
|
*/
|
||||||
|
private WxCpXmlOutMessage handleSpecial(WxCpXmlMessage wxMessage) {
|
||||||
|
//TODO
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,26 @@
|
|||||||
|
package com.cpop.sdk.framework.handler.wxCp;
|
||||||
|
|
||||||
|
import me.chanjar.weixin.common.session.WxSessionManager;
|
||||||
|
import me.chanjar.weixin.cp.api.WxCpService;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlMessage;
|
||||||
|
import me.chanjar.weixin.cp.bean.message.WxCpXmlOutMessage;
|
||||||
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
@Component
|
||||||
|
public class UnsubscribeHandler extends AbstractHandler {
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public WxCpXmlOutMessage handle(WxCpXmlMessage wxMessage, Map<String, Object> context, WxCpService cpService,
|
||||||
|
WxSessionManager sessionManager) {
|
||||||
|
String openId = wxMessage.getFromUserName();
|
||||||
|
this.logger.info("取消关注用户 OPENID: " + openId);
|
||||||
|
// TODO 可以更新本地数据库为取消关注状态
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -1,6 +1,6 @@
|
|||||||
package com.cpop.sdk.framework.handler;
|
package com.cpop.sdk.framework.handler.wxOpen;
|
||||||
|
|
||||||
import com.cpop.sdk.framework.config.WxOpenProperties;
|
import com.cpop.sdk.framework.config.wxOpen.WxOpenProperties;
|
||||||
import me.chanjar.weixin.open.api.impl.WxOpenInRedisTemplateConfigStorage;
|
import me.chanjar.weixin.open.api.impl.WxOpenInRedisTemplateConfigStorage;
|
||||||
import me.chanjar.weixin.open.api.impl.WxOpenMessageRouter;
|
import me.chanjar.weixin.open.api.impl.WxOpenMessageRouter;
|
||||||
import me.chanjar.weixin.open.api.impl.WxOpenServiceImpl;
|
import me.chanjar.weixin.open.api.impl.WxOpenServiceImpl;
|
||||||
@ -0,0 +1,28 @@
|
|||||||
|
package com.cpop.sdk.framework.utils;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonInclude.Include;
|
||||||
|
import com.fasterxml.jackson.core.JsonProcessingException;
|
||||||
|
import com.fasterxml.jackson.databind.ObjectMapper;
|
||||||
|
import com.fasterxml.jackson.databind.SerializationFeature;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author <a href="https://github.com/binarywang">Binary Wang</a>
|
||||||
|
*/
|
||||||
|
public class JsonUtils {
|
||||||
|
private static final ObjectMapper JSON = new ObjectMapper();
|
||||||
|
|
||||||
|
static {
|
||||||
|
JSON.setSerializationInclusion(Include.NON_NULL);
|
||||||
|
JSON.configure(SerializationFeature.INDENT_OUTPUT, Boolean.TRUE);
|
||||||
|
}
|
||||||
|
|
||||||
|
public static String toJson(Object obj) {
|
||||||
|
try {
|
||||||
|
return JSON.writeValueAsString(obj);
|
||||||
|
} catch (JsonProcessingException e) {
|
||||||
|
e.printStackTrace();
|
||||||
|
}
|
||||||
|
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
}
|
||||||
@ -28,3 +28,12 @@ wx:
|
|||||||
#
|
#
|
||||||
aesKey:
|
aesKey:
|
||||||
msgDataFormat: JSON
|
msgDataFormat: JSON
|
||||||
|
#企业微信
|
||||||
|
cp:
|
||||||
|
corpId: ww9b83a363662f219f
|
||||||
|
appConfigs:
|
||||||
|
#通讯录
|
||||||
|
- agentId: 1000001
|
||||||
|
secret:
|
||||||
|
token:
|
||||||
|
aesKey:
|
||||||
6
pom.xml
6
pom.xml
@ -162,6 +162,12 @@
|
|||||||
<artifactId>weixin-java-miniapp</artifactId>
|
<artifactId>weixin-java-miniapp</artifactId>
|
||||||
<version>${wechat-java.version}</version>
|
<version>${wechat-java.version}</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
|
<!--企业微信-->
|
||||||
|
<dependency>
|
||||||
|
<groupId>com.github.binarywang</groupId>
|
||||||
|
<artifactId>weixin-java-cp</artifactId>
|
||||||
|
<version>${wechat-java.version}</version>
|
||||||
|
</dependency>
|
||||||
<!-- 腾讯云-->
|
<!-- 腾讯云-->
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.qcloud</groupId>
|
<groupId>com.qcloud</groupId>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user