| | |
| | | |
| | | @Override |
| | | public OtherClient create(Throwable throwable) { |
| | | log.error("商品调用失败:{}", throwable.getMessage()); |
| | | log.error("单位用失败:{}", throwable.getMessage()); |
| | | return new OtherClient() { |
| | | |
| | | @Override |
| | |
| | | |
| | | @Override |
| | | public R addSysUser(SysUser user) { |
| | | return R.fail("添加用户失败:" + cause.getMessage()); |
| | | throw new RuntimeException("添加用户失败:" + cause.getMessage()); |
| | | } |
| | | |
| | | @Override |
| | | public R resetPassword(SysUser user) { |
| | | return R.fail("重置用户密码失败:" + cause.getMessage()); |
| | | throw new RuntimeException("重置用户密码失败:" + cause.getMessage()); |
| | | } |
| | | }; |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | // 获取登录信息 |
| | | // LoginUser loginUser = tokenService.getLoginUser(); |
| | | // String userName = loginUser.getUsername(); |
| | |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | // this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | // 获取登录信息 |
| | | // LoginUser loginUser = tokenService.getLoginUser(); |
| | | // System.err.println(loginUser); |
| | |
| | | * @return 优惠券ids 查询每个优惠券的发放数量 |
| | | */ |
| | | @PostMapping("/getCountByCouponIds") |
| | | public R<List<Integer>> getCountByCouponIds(String couponIds) { |
| | | public R<List<Integer>> getCountByCouponIds(@RequestParam("couponIds") String couponIds) { |
| | | // 最终结果 和优惠券id一一对应 |
| | | List<Integer> res = new ArrayList<>(); |
| | | String[] split = couponIds.split(","); |
| | |
| | | otherClient.unitAddorUpadate(tCompany); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "单位管理删除", tags = {"用户管理-单位管理"}) |
| | | @PostMapping(value = "/unit/delete/{id}") |
| | | public R add(@PathVariable Integer id) { |
| | |
| | | user.setRoleId(partner.getRoleId().longValue()); |
| | | user.setRoleType(2); |
| | | user.setObjectId(partner.getId()); |
| | | R r = sysUserClient.addSysUser(user); |
| | | if(200 != r.getCode()){ |
| | | throw new RuntimeException(r.getMsg()); |
| | | } |
| | | sysUserClient.addSysUser(user); |
| | | return AjaxResult.success(); |
| | | } |
| | | |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDate; |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | } |
| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.context.annotation.Configuration; |
| | | |
| | | import java.time.LocalDateTime; |
| | | import java.util.Date; |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void insertFill(MetaObject metaObject) { |
| | | this.setFieldValByName("createTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("createTime", LocalDateTime.now(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | |
| | | /** |
| | |
| | | */ |
| | | @Override |
| | | public void updateFill(MetaObject metaObject) { |
| | | this.setFieldValByName("updateTime", new Date(), metaObject); |
| | | this.setFieldValByName("updateTime", LocalDateTime.now(), metaObject); |
| | | } |
| | | } |