| | |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.security.service.TokenService; |
| | | import com.ruoyi.common.security.utils.MD5Generator; |
| | | import com.ruoyi.common.security.utils.SecurityUtils; |
| | | import com.ruoyi.order.feignClient.OrderClient; |
| | | import com.ruoyi.order.vo.VerifiableShopVo; |
| | |
| | | user.setRoleType(2); |
| | | user.setObjectId(shopId); |
| | | user.setAppUserId(appUser.getId()); |
| | | user.setPassword(phone.substring(5)); |
| | | String s = MD5Generator.generateMD5(phone.substring(5)); |
| | | user.setPassword(s); |
| | | user.setCreateTime(new Date()); |
| | | Long userId = sysUserClient.saveShopUser(user).getData(); |
| | | |
| | |
| | | @GetMapping("/getDetailById") |
| | | @ApiOperation(value = "门店详情", tags = {"管理后台-门店管理"}) |
| | | public R<Shop> getDetailById(@RequestParam("id") Integer id){ |
| | | Shop byId = shopService.getById(id); |
| | | return R.ok(byId); |
| | | Shop shop = shopService.getById(id); |
| | | if (null != shop.getPid() && shop.getPid()==0){ |
| | | shop.setPid(null); |
| | | } |
| | | return R.ok(shop); |
| | | } |
| | | |
| | | @DeleteMapping("/deleteShop") |
| | |
| | | userShop.setRoleType(1); |
| | | List<UserShop> data = userShopClient.getUserShop(userShop).getData(); |
| | | SysUser userData = sysUserClient.getSysUser(data.get(0).getUserId()).getData(); |
| | | userData.setPassword(userData.getPhonenumber().substring(5)); |
| | | String s = MD5Generator.generateMD5(userData.getPhonenumber().substring(5)); |
| | | userData.setPassword(s); |
| | | sysUserClient.resetPassword(userData); |
| | | } |
| | | return R.ok(); |