diff --git a/cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysApprovalController.java b/cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysApprovalController.java index 6ac9a0aa30a33002ea3ffaa5a450591097abd76b..a7e58abb3c603ac078dda8494fcc4664d18aa250 100644 --- a/cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysApprovalController.java +++ b/cement-business/src/main/java/cn/wise/sc/cement/business/controller/SysApprovalController.java @@ -5,6 +5,7 @@ import cn.wise.sc.cement.business.entity.SysGroup; import cn.wise.sc.cement.business.model.BaseResponse; import cn.wise.sc.cement.business.model.PageQuery; import cn.wise.sc.cement.business.service.ISysApprovalService; +import cn.wise.sc.cement.business.service.ISysDictionaryService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.slf4j.Logger; @@ -29,6 +30,8 @@ public class SysApprovalController { @Autowired private ISysApprovalService approvalService; + @Autowired + private ISysDictionaryService dictionaryService; @ApiOperation(value = "审批分页列表") @GetMapping("/getPage") @@ -78,5 +81,28 @@ public class SysApprovalController { return BaseResponse.errorMsg("失败!"); } + @ApiOperation(value = "åˆ é™¤å®¡æ‰¹") + @PostMapping("/delete/{id}") + public BaseResponse delete(@PathVariable Integer id) { + try { + approvalService.removeById(id); + return BaseResponse.okData("åˆ é™¤æˆåŠŸ"); + } catch (Exception e) { + log.debug("åˆ é™¤å®¡æ‰¹{}", e); + } + return BaseResponse.errorMsg("失败!"); + } + + @ApiOperation(value = "获å–审批æµç¨‹åˆ—表") + @GetMapping("/getSampleFormList") + public BaseResponse getSampleFormList() { + try { + return dictionaryService.getContent("审批æµç¨‹"); + } catch (Exception e) { + log.debug("获å–审批æµç¨‹åˆ—表{}", e); + } + return BaseResponse.errorMsg("失败!"); + } + } diff --git a/cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java b/cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java index cf82d539c0affc750d9a0cff29aaf92c59232600..8e0c49bda6c428475c1eaca971ed1b1bef1f1cd8 100644 --- a/cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java +++ b/cement-business/src/main/java/cn/wise/sc/cement/business/service/impl/WeiXinService.java @@ -47,7 +47,7 @@ public class WeiXinService { System.out.println("==================code==================="); System.out.println(code); try { - /* String accessToken = null; + String accessToken = null; if (type.equals("PC")) { accessToken = getAccessToken(); } else if (type.equals("APP")) { @@ -64,10 +64,10 @@ public class WeiXinService { String UserId = jsonObject.getString("UserId"); System.out.println("==================UserId==================="); System.out.println(UserId); - JSONObject userJson = getUser(accessToken, UserId);*/ + JSONObject userJson = getUser(accessToken, UserId); QueryWrapper<SysUser> wrapper = new QueryWrapper<>(); -// wrapper.eq("phone", userJson.get("mobile")); - wrapper.eq("phone", code); //暂时用手机å·ä»£æ›¿code + wrapper.eq("phone", userJson.get("mobile")); +// wrapper.eq("phone", code); //暂时用手机å·ä»£æ›¿code SysUser sysUser = userService.getOne(wrapper); if (sysUser == null) { return BaseResponse.errorMsg("éžç³»ç»Ÿç”¨æˆ·ä¸å…许登录!"); @@ -83,8 +83,8 @@ public class WeiXinService { sysUser.getName(), sysUser.getPhone()); System.out.println(token); redisUtil.setString(sysUser.getId().toString(), token, 3600); -// sysUser.setWxId(UserId); -// userService.updateById(sysUser); + sysUser.setWxId(UserId); + userService.updateById(sysUser); return BaseResponse.okData(token); } catch (Exception e) { return BaseResponse.errorMsg(e.getMessage()); diff --git a/cement-business/src/main/resources/application.yml b/cement-business/src/main/resources/application.yml index 3b7d145ba79b6daea421bc9018d8d73374bbb573..65004b1066cbc2a4f064cc0dddfdd758f15374df 100644 --- a/cement-business/src/main/resources/application.yml +++ b/cement-business/src/main/resources/application.yml @@ -7,8 +7,8 @@ spring: active: dev datasource: # 192.168.110.85 admin!@#123 - url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false -# url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false +# url: jdbc:mysql://192.168.110.85:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false + url: jdbc:mysql://81.68.92.175:3306/sinoma_tcdri?serverTimezone=Asia/Shanghai&useUnicode=true&characterEncoding=UTF-8&useSSL=false username: root password: admin!@#123 driverClassName: com.mysql.cj.jdbc.Driver