对接企业微信

This commit is contained in:
2026-04-24 20:10:51 +08:00
parent 03ba0c9090
commit d1ff7bde35
16 changed files with 1097 additions and 3 deletions

View File

@@ -1,5 +1,7 @@
package com.rj.controller;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.rj.common.DictItemConstants;
import com.rj.dto.QiWeiConfig;
import com.rj.entity.DictItem;
import com.rj.service.IDictItemService;
@@ -26,6 +28,8 @@ public class DictItemController {
@Autowired
private IDictItemService dictItemService;
private static final ObjectMapper OBJECT_MAPPER = new ObjectMapper();
@PostMapping("/add")
@Operation(summary = "新增")
public ResponseEntity<Map<String, Object>> add(
@@ -90,10 +94,18 @@ public class DictItemController {
try {
DictItem data = dictItemService.getById(id);
if (data == null) {
if ("qiwei_config".equals(name)) {
if (DictItemConstants.QIWEI_CONFIG.equals(name)) {
result.put("success", true);
result.put("message", "查询成功");
result.put("data", new QiWeiConfig());
data= new DictItem();
QiWeiConfig cfg = new QiWeiConfig();
cfg.setCorpid("-");
cfg.setAppSecret("-");
cfg.setContractSecret("-");
data.setValue(OBJECT_MAPPER.writeValueAsString(cfg));
data.setName(DictItemConstants.QIWEI_CONFIG);
data.setDescription("企微的默认配置项");
result.put("data", data);
return ResponseEntity.ok(result);
}