| | |
| | | |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | | import com.matrix.biz.bean.BizUser; |
| | | import com.matrix.system.hive.bean.SysVipInfo; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.constance.AppConstance; |
| | | |
| | |
| | | @PostMapping(value = "/saveReceiveAddress") |
| | | public @ResponseBody |
| | | AjaxResult saveReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | receiveAddress.setCreateBy(loginUser.getOpenId()); |
| | | receiveAddress.setUpdateBy(loginUser.getOpenId()); |
| | | receiveAddress.setAddrUserid(loginUser.getOpenId()); |
| | |
| | | @PostMapping("/findReceiveAddress") |
| | | @ResponseBody |
| | | public AjaxResult getByAddrUserId(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | String userId = loginUser.getOpenId(); |
| | | receiveAddress.setAddrUserid(userId); |
| | | List<ShopReceiveAddress> list = shopReceiveAddressDao.selectByModel(receiveAddress); |
| | |
| | | @PostMapping("/findAddrByAddrId/{addrId}") |
| | | @ResponseBody |
| | | public AjaxResult getByAddrId(@PathVariable("addrId") Integer addrId) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | String userId = loginUser.getOpenId(); |
| | | ShopReceiveAddress params = new ShopReceiveAddress(); |
| | | params.setAddrUserid(userId); |
| | |
| | | @PostMapping(value = "/updateReceiveAddress") |
| | | public @ResponseBody |
| | | AjaxResult updateReceiveAddress(@RequestBody ShopReceiveAddress receiveAddress) { |
| | | BizUser loginUser = redisUserLoginUtils.getLoginUser(BizUser.class); |
| | | SysVipInfo loginUser = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | receiveAddress.setCreateBy(loginUser.getOpenId()); |
| | | receiveAddress.setUpdateBy(loginUser.getOpenId()); |
| | | receiveAddress.setAddrUserid(loginUser.getOpenId()); |