| | |
| | | |
| | | import com.google.gson.Gson; |
| | | import com.google.gson.GsonBuilder; |
| | | import com.matrix.component.redis.RedisUserLoginUtils; |
| | | import com.matrix.system.common.init.UserCacheManager; |
| | | import com.matrix.component.tools.WxUtils; |
| | | import com.matrix.component.wechat.externalInterface.protocol.paramProtocol.BrandWCPayRequestData; |
| | | import com.matrix.core.exception.GlobleException; |
| | |
| | | private ShopActivitiesGroupInfoDao shopActivitiesGroupInfoDao; |
| | | |
| | | @Autowired |
| | | private RedisUserLoginUtils redisUserLoginUtils; |
| | | private UserCacheManager userCacheManager; |
| | | |
| | | @Autowired |
| | | private ShopActivitiesGroupPriceDao shopActivitiesGroupPriceDao; |
| | |
| | | @Override |
| | | @Transactional(rollbackFor = Exception.class) |
| | | public AjaxResult createGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | ShopActivitiesGroupPrice groupPrice = shopActivitiesGroupPriceDao.selectById(createGroupBuyDTO.getGpId()); |
| | | ShopActivitiesGroupInfo groupInfo = shopActivitiesGroupInfoDao.selectGroupInfoByActId(groupPrice.getActId()); |
| | |
| | | @Transactional(rollbackFor = Exception.class) |
| | | @Override |
| | | public AjaxResult joinGroupBuy(CreateGroupBuyDTO createGroupBuyDTO) throws Exception { |
| | | SysVipInfo sysVipInfo = redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); |
| | | |
| | | // TODO 需判断拼团结束时间以及当前拼团是否已满员 |
| | | |
| | |
| | | if (shopReceiveAddress == null) { |
| | | throw new GlobleException("请选择正确的收获地址"); |
| | | } |
| | | SysVipInfo user=redisUserLoginUtils.getLoginUser(SysVipInfo.class); |
| | | SysVipInfo user=userCacheManager.getLoginUser(); |
| | | ShopOrder shopOrder = new ShopOrder(); |
| | | shopOrder.setCompanyId(user.getCompanyId()); |
| | | shopOrder.setStoreId(Integer.parseInt(createGroupBuyDTO.getShopId().toString())); |