袁野 3 months ago
commit ea681a0984
  1. 5
      bweb/src/main/java/com/bweb/config/AuthConfig.java
  2. 476
      bweb/src/main/java/com/bweb/controller/BsUserController.java
  3. 1
      bweb/src/main/java/com/bweb/controller/FileUploadController.java
  4. 52
      bweb/src/main/java/com/bweb/controller/TestController.java
  5. 6
      bweb/src/main/java/com/bweb/controller/goods/GoodsController.java
  6. 2
      bweb/src/main/resources/pre/application.yml
  7. 4
      bweb/src/main/resources/pre/config.properties
  8. 76
      cweb/src/main/java/com/cweb/controller/hlt/HltCanteenController.java
  9. 2
      cweb/src/main/resources/pre/application.yml
  10. 2
      cweb/src/main/resources/pre/config.properties
  11. 4
      openapi/src/main/resources/dev/config.properties
  12. 2
      openapi/src/main/resources/pre/application.yml
  13. 4
      openapi/src/main/resources/pre/config.properties
  14. 2
      openapi/src/main/resources/prod/application.yml
  15. 4
      openapi/src/main/resources/prod/config.properties
  16. 3
      order/src/main/java/com/order/config/AuthConfig.java
  17. 1
      order/src/main/java/com/order/controller/business/BsOrderCinemaController.java
  18. 47
      order/src/main/java/com/order/controller/notify/EtcNotify.java
  19. 2
      order/src/main/resources/pre/application.yml
  20. 4
      order/src/main/resources/pre/config.properties
  21. 2
      schedule/src/main/resources/pre/application.yml
  22. 2
      service/src/main/java/com/hfkj/common/utils/DesUtil.java
  23. 4
      service/src/main/java/com/hfkj/config/CommonSysConfig.java
  24. 292
      service/src/main/java/com/hfkj/dao/BsOrderMapperExt.java
  25. 49
      service/src/main/java/com/hfkj/dao/BsUserCardMapperExt.java
  26. 64
      service/src/main/java/com/hfkj/dao/BsUserMapperExt.java
  27. 3
      service/src/main/java/com/hfkj/dao/GoodsUserAddressMapper.java
  28. 38
      service/src/main/java/com/hfkj/dao/GoodsUserAddressMapperExt.java
  29. 10
      service/src/main/java/com/hfkj/service/CommonService.java
  30. 23
      service/src/main/java/com/hfkj/service/card/BsUserCardService.java
  31. 20
      service/src/main/java/com/hfkj/service/card/impl/BsUserCardServiceImpl.java
  32. 9
      service/src/main/java/com/hfkj/service/coupon/BsOrderCouponNoService.java
  33. 13
      service/src/main/java/com/hfkj/service/coupon/impl/BsOrderCouponNoServiceImpl.java
  34. 10
      service/src/main/java/com/hfkj/service/goods/BsOrderGoodsService.java
  35. 9
      service/src/main/java/com/hfkj/service/goods/GoodsUserAddressService.java
  36. 14
      service/src/main/java/com/hfkj/service/goods/impl/BsOrderGoodsServiceImpl.java
  37. 5
      service/src/main/java/com/hfkj/service/goods/impl/GoodsUserAddressServiceImpl.java
  38. 2
      service/src/main/java/com/hfkj/service/goods/impl/GoodsVpdServiceImpl.java
  39. 52
      service/src/main/java/com/hfkj/service/hlt/HltCanteenService.java
  40. 10
      service/src/main/java/com/hfkj/service/impl/CommonServiceImpl.java
  41. 4
      service/src/main/java/com/hfkj/service/order/OrderCreateService.java
  42. 5
      service/src/main/java/com/hfkj/service/order/OrderPaySuccessService.java
  43. 15
      service/src/main/java/com/hfkj/service/order/impl/BsOrderChildServiceImpl.java
  44. 29
      service/src/main/java/com/hfkj/service/order/impl/BsOrderServiceImpl.java
  45. 21
      service/src/main/java/com/hfkj/service/user/BsUserService.java
  46. 42
      service/src/main/java/com/hfkj/service/user/PhgDataUserService.java
  47. 31
      service/src/main/java/com/hfkj/service/user/impl/BsUserServiceImpl.java
  48. 182
      service/src/main/java/com/hfkj/service/user/impl/PhgDataUserServiceImpl.java
  49. 18
      service/src/main/resources/dev/commonConfig.properties
  50. 6
      service/src/main/resources/prod/commonConfig.properties
  51. 12
      user/src/main/java/com/user/controller/BsUserController.java
  52. 2
      user/src/main/resources/pre/application.yml
  53. 4
      user/src/main/resources/pre/config.properties

@ -88,7 +88,12 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/fileUpload/*")
.excludePathPatterns("/common/*")
.excludePathPatterns("/test/*")
.excludePathPatterns("/secMenu/queryMenuList")
.excludePathPatterns("/user/phgDataUser")
.excludePathPatterns("/user/phgDataUserDetail")
.excludePathPatterns("/user/phgDataUserOrder")
.excludePathPatterns("/user/downloadImage")
;
}

@ -6,25 +6,48 @@ import com.github.pagehelper.PageInfo;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.common.utils.OrderUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserComplaint;
import com.hfkj.entity.*;
import com.hfkj.model.ResponseData;
import com.hfkj.service.CommonService;
import com.hfkj.service.card.BsUserCardService;
import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.goods.BsOrderGoodsService;
import com.hfkj.service.goods.GoodsSpecsService;
import com.hfkj.service.goods.GoodsUserAddressService;
import com.hfkj.service.goods.GoodsVpdService;
import com.hfkj.service.order.BsOrderChildService;
import com.hfkj.service.order.BsOrderDeductionService;
import com.hfkj.service.order.BsOrderService;
import com.hfkj.service.user.BsUserComplaintService;
import com.hfkj.service.user.BsUserService;
import com.hfkj.service.user.PhgDataUserService;
import com.hfkj.service.user.impl.BsUserServiceImpl;
import com.hfkj.sysenum.SecUserStatusEnum;
import com.hfkj.sysenum.UserStatusEnum;
import com.hfkj.sysenum.order.OrderChildStatusEnum;
import com.hfkj.sysenum.order.OrderStatusEnum;
import com.mysql.jdbc.StringUtils;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.ListUtils;
import org.mvel2.util.Make;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Isolation;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
import java.math.BigDecimal;
import java.util.*;
import java.util.function.Function;
import java.util.stream.Collectors;
/**
* @className: BsUserController
@ -42,6 +65,23 @@ public class BsUserController {
@Resource
private BsUserComplaintService userComplaintService;
@Resource
private PhgDataUserService phgDataUserService;
@Resource
private BsUserCardService userCardService;
@Resource
private CommonService commonService;
@Resource
private GoodsUserAddressService goodsUserAddressService;
@Resource
private GoodsSpecsService goodsSpecsService;
@Resource
private GoodsVpdService goodsVpdService;
@RequestMapping(value="/restore",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "恢复")
@ -137,4 +177,432 @@ public class BsUserController {
return ResponseMsgUtil.exception(e);
}
}
// @RequestMapping(value="/phgDataUser",method = RequestMethod.GET)
// @ResponseBody
// @ApiOperation(value = "普惠GO用户数据迁移")
// public ResponseData phgDataUser() {
// try {
// // 查询普惠GO老用户数据
// Map<String ,Object> param = new HashMap<>();
// param.put("type" , 1);
// List<CyymallUser> list = phgDataUserService.getList(param);
//
// Map<String , CyymallUser> cyymallUserMap = list.stream().collect(Collectors.toMap(CyymallUser:: getWechatOpenId , Function.identity() , (cyymallUser, cyymallUser2) -> cyymallUser));
// List<CyymallUser> cyymallUserList = new ArrayList<>(cyymallUserMap.values());
//
// // 查询新普惠GO用户数据
// List<BsUser> bsUserList = userService.getList(new HashMap<>());
//
// // 定义用户 工会卡 新增用户列表 新增用户工会卡列表 更新用户列表 更新用户工会卡列表
// BsUser sysUser;
// List<BsUser> listUserInsert = new ArrayList<>();
// List<BsUser> listUserUpdate = new ArrayList<>();
//
// // 循环老用户数据 组装新数据
// for (CyymallUser user : cyymallUserList) {
// sysUser = new BsUser();
// if (user.getBinding() != null) {
// //判断新老用户数据是否有相同数据 根据手机号
// List<BsUser> bsUsers = bsUserList.stream()
// .filter(bsUser -> Objects.equals(bsUser.getPhone(), user.getBinding()))
// .collect(Collectors.toList());
// List<BsUser> bsUsersOpenId = bsUserList.stream()
// .filter(bsUser -> Objects.equals(bsUser.getWxMaOpenid(), user.getWechatOpenId()))
// .collect(Collectors.toList());
// if (!bsUsers.isEmpty() || !bsUsersOpenId.isEmpty()) {
// sysUser = bsUsers.get(0);
// } else {
// sysUser = new BsUser();
// }
// }
//
// // 组装用户数据
// sysUser.setHeadImg(user.getAvatarUrl());
// sysUser.setStatus(UserStatusEnum.status1.getCode());
// sysUser.setPhone(user.getBinding());
// sysUser.setWxMaOpenid(user.getWechatOpenId());
// sysUser.setIntegral(0L);
// sysUser.setUpdateTime(new Date());
// sysUser.setExt1(String.valueOf(user.getId()));
// sysUser.setExt2(user.getGhCardNo());
// if (sysUser.getId() == null) {
// sysUser.setName(user.getNickname());
// sysUser.setCreateTime(new Date());
// listUserInsert.add(sysUser);
// }else {
// listUserUpdate.add(sysUser);
// }
// }
//
// if (!listUserInsert.isEmpty()) {
// userService.insertUserBatch(listUserInsert);
// }
// if (!listUserUpdate.isEmpty()) {
// userService.updateUserBatch(listUserUpdate);
// }
//
// return ResponseMsgUtil.success("成功");
//
// } catch (Exception e) {
// log.error("error!",e);
// return ResponseMsgUtil.exception(e);
// }
// }
//
//
//
// @RequestMapping(value="/phgDataUserDetail",method = RequestMethod.GET)
// @ResponseBody
// @ApiOperation(value = "普惠GO用户详细数据迁移")
// public ResponseData phgDataUserDetail() {
// try {
//
// // 查询新用户数据 查询新工会卡数据 查询 老收货地址数据 查询新城市数据
// List<BsUser> bsUserList = userService.getList(new HashMap<>());
// List<CyymallAddress> cyymallAddresses = phgDataUserService.getAddressList();
// List<BsCity> cityList = commonService.getCityListAll();
//
//
// // 定义用户 工会卡 收货地址数据 更新用户工会卡列表 新增收货地址列表
// BsUserCard sysUserCard;
// GoodsUserAddress userAddress;
// List<BsUserCard> listCardUpdate = new ArrayList<>();
// List<GoodsUserAddress> userAddresses = new ArrayList<>();
//
// // 循环新用户数据 组装逐句
// for (BsUser bsUser : bsUserList) {
// // 根据工会卡数据 匹配用户数据中的老数据 更新用户ID
// if (!StringUtils.isNullOrEmpty(bsUser.getExt2())) {
// sysUserCard = new BsUserCard();
// sysUserCard.setCardNo(bsUser.getExt2());
// sysUserCard.setType(1);
// sysUserCard.setStatus(1);
// sysUserCard.setUserId(bsUser.getId());
// sysUserCard.setCreateTime(new Date());
// sysUserCard.setUpdateTime(new Date());
// listCardUpdate.add(sysUserCard);
// }
//
// // 匹配收货地址数据 新增新收货地址
// List<CyymallAddress> cyymallAddressList = cyymallAddresses.stream()
// .filter(cyymallAddress -> Objects.equals(cyymallAddress.getUserId().toString() , bsUser.getExt1()))
// .collect(Collectors.toList());
// if (!cyymallAddressList.isEmpty()) {
// for (CyymallAddress address : cyymallAddressList) {
// List<BsCity> bsCities = cityList.stream().filter(city -> Objects.equals(city.getRegionName() , address.getDistrict())).collect(Collectors.toList());
// if (!bsCities.isEmpty()) {
// userAddress = new GoodsUserAddress();
// userAddress.setRegionId(String.valueOf(bsCities.get(0).getRegionId()));
// userAddress.setRegionName(address.getProvince() + "," + address.getCity() + "," + address.getDistrict());
// userAddress.setAddress(address.getDetail());
// userAddress.setUserId(bsUser.getId());
// userAddress.setCreateTime(new Date());
// userAddress.setUpdateTime(new Date());
// userAddress.setPhone(address.getMobile());
// userAddress.setConsignee(address.getName());
// userAddress.setWhetherDefault(address.getIsDefault() == 1);
// userAddresses.add(userAddress);
// }
//
// }
//
// }
//
// }
//
// if (!listCardUpdate.isEmpty()) {
// userCardService.insertUserCardBatch(listCardUpdate);
// }
//
// if (!userAddresses.isEmpty()) {
// goodsUserAddressService.insertUserAddressBatch(userAddresses);
// }
//
// return ResponseMsgUtil.success("成功");
//
// } catch (Exception e) {
// log.error("error!",e);
// return ResponseMsgUtil.exception(e);
// }
// }
//
//
// @RequestMapping(value="/phgDataUserOrder",method = RequestMethod.GET)
// @ResponseBody
// @ApiOperation(value = "普惠GO用户订单数据迁移")
// public ResponseData phgDataUserOrder() {
// try {
//
// Map<String , Object> map = new HashMap<>();
// map.put("isPay" , 1);
// map.put("applyDelete" , 0);
// // 查询新用户数据 查询老用户订单列表 老收货订单详情 查询老商品列表 虚拟产品配置列表
// List<BsUser> bsUserList = userService.getList(new HashMap<>());
// List<CyymallOrder> cyymallOrderList = phgDataUserService.getListOrder(map);
// List<CyymallOrderDetail> orderDetailList = phgDataUserService.getListOrderDetail();
// List<CyymallGoods> goodsList = phgDataUserService.getListGoods();
//
// BsOrder order;
// BsOrderChild orderChild;
// BsOrderCoupon orderCoupon;
// BsOrderCouponNo orderCouponNo;
// BsOrderGoods orderGoods;
// BsOrderDeduction orderDeduction;
//
// List<BsOrder> addOrderList = new ArrayList<>();
// List<BsOrderChild> addOrderChildList = new ArrayList<>();
// List<BsOrderCoupon> addOrderCouponList = new ArrayList<>();
// List<BsOrderCouponNo> addOrderCouponNoList = new ArrayList<>();
// List<BsOrderGoods> addOrderGoodsList = new ArrayList<>();
// List<BsOrderDeduction> addOrderDeductionList = new ArrayList<>();
// BigDecimal price = new BigDecimal(0);
//
// for (CyymallOrder cyymallOrder : cyymallOrderList) {
// // 查询相关订单详情内容
// List<CyymallOrderDetail> orderDetail = orderDetailList.stream().filter(detail -> Objects.equals(detail.getOrderId() , cyymallOrder.getId()))
// .collect(Collectors.toList());
// // 查询用户信息
// List<BsUser> userList = bsUserList.stream().filter(user -> Objects.equals(user.getExt1() , cyymallOrder.getUserId().toString())).collect(Collectors.toList());
// // 判断用户是否存在
// if (!userList.isEmpty()) {
// BsUser user = userList.get(0);
// // 判断是否存在订单详情 不存在不添加
// if (!orderDetail.isEmpty()) {
// CyymallOrderDetail cyymallOrderDetail = orderDetail.get(0);
// // 查询产品
// List<CyymallGoods> goods = goodsList.stream().filter(cyymallGoods -> Objects.equals(cyymallGoods.getId() , cyymallOrderDetail.getGoodsId()))
// .collect(Collectors.toList());
// // 判断产品不为空
// if (!goods.isEmpty()) {
// CyymallGoods cyymallGoods = goods.get(0);
//
//
// // 公用订单数据
// order = new BsOrder();
// orderChild = new BsOrderChild();
// orderCoupon = new BsOrderCoupon();
// orderCouponNo = new BsOrderCouponNo();
// orderDeduction = new BsOrderDeduction();
// orderGoods = new BsOrderGoods();
// // 定义订单内容
// order.setOrderNo(cyymallOrder.getOrderNo());
// Long createTime = (long) (cyymallOrder.getAddtime() )* 1000;
// Long payTime = (long) (cyymallOrder.getPayTime() )* 1000;
// order.setCreateTime(DateUtil.long2Date(createTime));
// order.setUpdateTime(new Date());
// order.setOrderStatus(OrderStatusEnum.status3.getCode());
// order.setFinishTime(new Date());
// order.setPayTime(DateUtil.long2Date(payTime));
// order.setUserId(user.getId());
// order.setUserName(user.getName());
// order.setPayChannel(4);
// order.setUserPhone(user.getPhone());
//
// // 订单金额
// order.setPayRealPrice(cyymallOrder.getPayPrice());
// order.setTotalPrice(cyymallOrder.getTotalPrice());
// order.setProductTotalPrice(cyymallOrder.getTotalPrice());
// order.setPayType(4);
// order.setExt3("迁移数据");
//
//
// // 定义子订单
// orderChild.setChildOrderNo(OrderUtil.generateChildOrderNo());
// orderChild.setOrderNo(order.getOrderNo());
// orderChild.setCreateTime(order.getCreateTime());
// orderChild.setUpdateTime(order.getUpdateTime());
// orderChild.setFinishTime(order.getFinishTime());
// // 优惠金额
// orderChild.setProductActualPrice(order.getPayRealPrice());
// orderChild.setIntegralDiscountPrice(0L);
// orderChild.setCouponDiscountPrice(price);
// orderChild.setProductTotalPrice(order.getProductTotalPrice());
// orderChild.setProductPrice(cyymallGoods.getPrice());
// orderChild.setSurplusRefundPrice(price);
// orderChild.setTotalDeductionPrice(price);
// orderChild.setSurplusRefundPrice(price);
// orderChild.setSurplusRefundCount(0);
// orderChild.setSurplusRefundIntegral(0L);
//
// // 产品数据
// orderChild.setProductCount(cyymallOrderDetail.getNum());
// orderChild.setProductName(cyymallGoods.getName());
// orderChild.setStatus(OrderChildStatusEnum.status3.getCode());
//
//
// // 优惠订单数据
// orderDeduction.setOrderNo(order.getOrderNo());
// orderDeduction.setIntegralDiscountPrice(0L);
// orderDeduction.setCouponDiscountPrice(price);
// orderDeduction.setCouponDiscountActualPrice(price);
// orderDeduction.setTotalDeductionPrice(price);
//
// // 判断实物产品
// if (!StringUtils.isNullOrEmpty(cyymallGoods.getOilCoutypecode())) {
// orderChild.setProductType(2);
// orderChild.setProductId(999999L);
// // todo 图片查询
// orderChild.setProductImg(cyymallOrderDetail.getPic());
// orderChild.setProductSpecId(999999L);
// orderChild.setProductSpecName(cyymallOrder.getName());
// // 定义卡券订单内容
// orderCoupon.setChildOrderNo(orderChild.getChildOrderNo());
// orderCoupon.setCreateTime(orderChild.getCreateTime());
// orderCoupon.setUpdateTime(orderChild.getUpdateTime());
// orderCoupon.setFinishTime(orderChild.getFinishTime());
// orderCoupon.setPayTime(order.getPayTime());
// orderCoupon.setOrderNo(orderChild.getOrderNo());
// // 优惠金额
// orderCoupon.setIntegralDiscountPrice(0L);
// orderCoupon.setCouponDiscountPrice(price);
// orderCoupon.setTotalDeductionPrice(price);
// orderCoupon.setPayRealPrice(order.getPayRealPrice());
// orderCoupon.setTotalPrice(order.getTotalPrice());
// orderCoupon.setPayType(order.getPayType());
// // todo 定义死数据
// orderCoupon.setGoodsBrandId(999999L);
// orderCoupon.setGoodsBrandName("贵州卡券");
// orderCoupon.setGoodsId(orderChild.getProductId());
// orderCoupon.setGoodsName("工会加油权益");
// orderCoupon.setGoodsCount(orderChild.getProductCount());
// orderCoupon.setGoodsSpescOriginalPrice(cyymallGoods.getOriginalPrice());
// orderCoupon.setGoodsVpdId(9L);
// orderCoupon.setGoodsVpdKey(cyymallGoods.getOilCoutypecode());
// orderCoupon.setGoodsSpecsId(257L);
// orderCoupon.setGoodsTypeId(999999L);
// orderCoupon.setGoodsTypeName("贵州卡券");
// orderCoupon.setGoodsSpecsName(cyymallGoods.getName());
// orderCoupon.setUserId(user.getId());
// orderCoupon.setUserPhone(user.getPhone());
// orderCoupon.setGoodsVpdSource(4);
// orderCoupon.setStatus(orderChild.getStatus());
// addOrderCouponList.add(orderCoupon);
// // 定义订单卡券号
// orderCouponNo.setGoodsVpdSource(orderCoupon.getGoodsVpdSource());
// orderCouponNo.setCreateTime(orderChild.getCreateTime());
// orderCouponNo.setUpdateTime(orderChild.getUpdateTime());
// orderCouponNo.setFinishTime(orderChild.getFinishTime());
// orderCouponNo.setDeliverTime(orderChild.getCreateTime());
// orderCouponNo.setExceptionStatus(false);
// orderCouponNo.setGoodsVpdKey(orderCoupon.getGoodsVpdKey());
// orderCouponNo.setGoodsVpdSourceCouNo(cyymallOrder.getCouponRecordId());
// orderCouponNo.setExt1(order.getOrderNo());
// orderCouponNo.setStatus(3);
// addOrderCouponNoList.add(orderCouponNo);
//
// }else {
// // 实物商品数据
// orderChild.setProductType(1);
// orderChild.setProductId(999999L);
// orderChild.setProductSpecId(999999L);
// orderChild.setProductSpecName(cyymallGoods.getName());
// orderGoods.setChildOrderNo(orderChild.getChildOrderNo());
// orderGoods.setCreateTime(orderChild.getCreateTime());
// orderGoods.setUpdateTime(orderChild.getUpdateTime());
// orderGoods.setFinishTime(orderChild.getFinishTime());
// orderGoods.setOrderNo(orderChild.getOrderNo());
// orderGoods.setGoodsId(999999L);
// orderGoods.setGoodsName(cyymallGoods.getName());
// orderGoods.setGoodsCount(orderChild.getProductCount());
// orderGoods.setGoodsSpecsId(999999L);
// orderGoods.setGoodsSpecsName(cyymallGoods.getName());
// orderGoods.setGoodsCount(orderChild.getProductCount());
// orderGoods.setGoodsSpecsId(999999L);
// orderGoods.setUserId(user.getId());
// orderGoods.setUserPhone(user.getPhone());
// orderGoods.setIntegralDiscountPrice(0L);
// orderGoods.setCouponDiscountPrice(price);
// orderGoods.setTotalDeductionPrice(price);
// orderGoods.setPayRealPrice(order.getPayRealPrice());
// orderGoods.setTotalPrice(order.getTotalPrice());
// orderGoods.setPayType(order.getPayType());
// orderGoods.setStatus(4);
// // todo 定义死数据
// orderGoods.setGoodsBrandId(99L);
// orderGoods.setGoodsBrandName("其他");
// // todo 图片
// orderChild.setProductImg(cyymallOrderDetail.getPic());
// orderGoods.setImg(cyymallOrderDetail.getPic());
// // 收货信息
// orderGoods.setDeliveryAddress(cyymallOrder.getAddress());
// orderGoods.setLogisticsStatusDesc("已完成");
// orderGoods.setLogisticsStatus("4");
// addOrderGoodsList.add(orderGoods);
// }
//
// // 插入订单
// addOrderList.add(order);
// addOrderChildList.add(orderChild);
// addOrderDeductionList.add(orderDeduction);
// }
// }
// }
//
// }
// if (!addOrderList.isEmpty()) {
//
// List<List<BsOrder>> partition = ListUtils.partition(addOrderList, 5000);
//
// for (List<BsOrder> orderList : partition) {
// phgDataUserService.insertOrderBatch(orderList);
// }
//
// }
// if (!addOrderChildList.isEmpty()) {
// List<List<BsOrderChild>> partitionChild = ListUtils.partition(addOrderChildList, 5000);
//
// for (List<BsOrderChild> orderChildList : partitionChild) {
// phgDataUserService.insertOrderChildBatch(orderChildList);
// }
//
// }
// if (!addOrderCouponList.isEmpty()) {
// List<List<BsOrderCoupon>> couponList = ListUtils.partition(addOrderCouponList, 5000);
//
// for (List<BsOrderCoupon> orderCouponList : couponList) {
// phgDataUserService.insertOrderCouponBatch(orderCouponList);
// }
// }
// if (!addOrderCouponNoList.isEmpty()) {
// List<List<BsOrderCouponNo>> couponNoList = ListUtils.partition(addOrderCouponNoList, 5000);
// for (List<BsOrderCouponNo> orderCouponNoList : couponNoList) {
// phgDataUserService.insertOrderCouponNoBatch(orderCouponNoList);
// }
// }
// if (!addOrderDeductionList.isEmpty()) {
// List<List<BsOrderDeduction>> deductionList = ListUtils.partition(addOrderDeductionList, 5000);
// for (List<BsOrderDeduction> orderDeductionList : deductionList) {
// phgDataUserService.insertOrderDeductionBatch(orderDeductionList);
// }
// }
// if (!addOrderGoodsList.isEmpty()) {
// List<List<BsOrderGoods>> orderGoodsList = ListUtils.partition(addOrderGoodsList, 5000);
// for (List<BsOrderGoods> orderGoodsList1 : orderGoodsList) {
// phgDataUserService.insertOrderGoodsBatch(orderGoodsList1);
// }
// }
//
// return ResponseMsgUtil.success("成功");
//
// } catch (Exception e) {
// log.error("error!",e);
// return ResponseMsgUtil.exception(e);
// }
// }
//
//
// @RequestMapping(value="/downloadImage",method = RequestMethod.GET)
// @ResponseBody
// @ApiOperation(value = "图片下载")
// public ResponseData downloadImage(@RequestParam(value = "imageUrl" , required = false) String imageUrl) {
// try {
//
// return ResponseMsgUtil.success(phgDataUserService.downloadImage(imageUrl));
//
// } catch (Exception e) {
// log.error("error!",e);
// return ResponseMsgUtil.exception(e);
// }
// }
}

@ -27,6 +27,7 @@ import java.io.File;
import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.io.InputStream;
import java.net.URL;
import java.util.*;
@RestController

@ -0,0 +1,52 @@
package com.bweb.controller;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.OrderUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.model.ResponseData;
import com.hfkj.service.hlt.HltCanteenService;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
@Controller
@RequestMapping(value="/test")
@Api(value="测试")
public class TestController {
private static Logger log = LoggerFactory.getLogger(TestController.class);
@RequestMapping(value="/canteenConsume",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "食堂消费")
public ResponseData canteenConsume(@RequestParam(value = "cardNo" , required = false) String cardNo,
@RequestParam(value = "instCode" , required = false) String instCode,
@RequestParam(value = "canteenId" , required = false) String canteenId) {
try {
String orderNo = OrderUtil.generateOrderNo();
JSONObject cardInfo = HltCanteenService.canteenConsume(orderNo , cardNo , instCode , canteenId);
if (StringUtils.isBlank(cardInfo.getString("data"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败");
}
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(cardInfo.getString("data")));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -147,9 +147,9 @@ public class GoodsController {
SessionObject sessionObject = userCenter.getSessionObject(request);
SecUserSessionObject userModel = (SecUserSessionObject) sessionObject.getObject();
if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
}
// if (userModel.getAccount().getObjectType() != SecUserObjectTypeEnum.type2.getCode()) {
// throw ErrorHelp.genException(SysCode.System, ErrorCode.ROLE_NOT_PERMISSIONS, "");
// }
if (body == null
|| body.getGoodsId() == null

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

@ -0,0 +1,76 @@
package com.cweb.controller.hlt;
import com.alibaba.fastjson.JSONObject;
import com.hfkj.common.exception.ErrorCode;
import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.OrderUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.model.ResponseData;
import com.hfkj.service.cms.CmsContentService;
import com.hfkj.service.hlt.HltCanteenService;
import com.hfkj.service.hlt.HuiLianTongUnionCardService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.annotation.Resource;
import java.util.HashMap;
import java.util.Map;
@Controller
@RequestMapping(value="/hltCanteen")
@Api(value="汇联通食堂接口")
public class HltCanteenController {
Logger log = LoggerFactory.getLogger(HltCanteenController.class);
@RequestMapping(value="/canteenConsume",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "食堂消费")
public ResponseData canteenConsume(@RequestParam(value = "cardNo" , required = false) String cardNo,
@RequestParam(value = "instCode" , required = false) String instCode,
@RequestParam(value = "canteenId" , required = false) String canteenId) {
try {
String orderNo = OrderUtil.generateOrderNo();
JSONObject info = HltCanteenService.canteenConsume(orderNo , cardNo , instCode , canteenId);
if (StringUtils.isBlank(info.getString("data"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败");
}
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(info.getString("data")));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
@RequestMapping(value="/queryCanteenOrder",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "食堂消费记录")
public ResponseData queryCanteenOrder(@RequestParam(value = "cardNo" , required = false) String cardNo) {
try {
JSONObject info = HltCanteenService.queryCanteenOrder(cardNo);
if (StringUtils.isBlank(info.getString("data"))) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "请求失败");
}
return ResponseMsgUtil.success(HuiLianTongUnionCardService.resolveResponse(info.getString("data")));
} catch (Exception e) {
log.error("error!",e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1 +1 @@
fileUrl=/home/project/hsg/filesystem
fileUrl=/home/project/phg/filesystem

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://127.0.0.1:3306/hsg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://127.0.0.1:3306/phg?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

@ -1,4 +1,4 @@
package com.cweb.config;
package com.order.config;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.fasterxml.jackson.databind.module.SimpleModule;
@ -88,6 +88,7 @@ public class AuthConfig implements WebMvcConfigurer {
.excludePathPatterns("/**/swagger-ui.html")
.excludePathPatterns("/notify/*")
.excludePathPatterns("/cqNotify/*")
.excludePathPatterns("/orderCinema/queryOrder")
;
}

@ -104,7 +104,6 @@ public class BsOrderCinemaController {
bsOrderCinemaService.update(bsOrderCinema);
}
return ResponseMsgUtil.success(object);
} catch (Exception e) {

@ -0,0 +1,47 @@
package com.order.controller.notify;
import com.alibaba.fastjson.JSONObject;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.PrintWriter;
@Controller
@RequestMapping(value = "/etcNotify")
@Api(value = "etc通知")
public class EtcNotify {
private static final Logger log = LoggerFactory.getLogger(QzCinemaNotify.class);
@RequestMapping(value = "/notify", method = RequestMethod.POST)
@ApiOperation(value = "回调")
@ResponseBody
public void notify(@RequestBody String reqBodyStr, HttpServletRequest request, HttpServletResponse response) {
try {
JSONObject dataObject = JSONObject.parseObject(reqBodyStr, JSONObject.class);
log.info("============回调任务Start=============");
log.info("尖椒订单充值-回调参数: " + dataObject);
log.info("============回调任务End=============");
response.setCharacterEncoding("UTF-8");
response.setContentType("text/html;charset=utf-8");
PrintWriter writer= response.getWriter();
writer.write("SUCCESS");
} catch (Exception e) {
log.error("WechatPayController --> wechatNotify() error!", e);
}
}
}

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -246,7 +246,7 @@ public class DesUtil {
/*String s = encode("中国", Charset.forName("UTF-8"),"12345678");
System.out.println(s);*/
//String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDwYfnUdBVz6Kj4HS2oCA1TTiqJkCUIYa5ckMhJeByBCAMsqu21LmFjb/hdW0y1Tt0Wk5PqmO8FAg==";
String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDMmj1rv5nOrkawWt8fskSihNw0wugKUT1xWjHhIN8af7NylRVfhJvbeja2Zjjxnwk3FEKgyvIvJnk3QgiY4aghqQcGKxDOlAxT/kjrkDd2ESu1IWkpi+0HGnG3rKSL6+a1Nu7aW+rPHwXUOmHSgWFZFb9HhlfKI/jml3GhMZBWsZFirayyMMi8UKrdYN7ANPEB/6uV9iVtpLF5Kz8M2+GpI0EqRhPFAH2u3Q/RSgW8ei2ZbOY9NnbkdwuOjU93wgJxdY1Y93hvLYNe1i9QkSM1";
String data = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YDMmj1rv5nOrkawWt8fskSihNw0wugKUT1xWjHhIN8af7NylRVfhJvbeja2Zjjxnwk3FEKgyvIvJnk3QgiY4aghqQcGKxDOlAxT/kjrkDd2ESu1IWkpi+0HGnG3rKSL6+a1Nu7aW+rPHwXUOmphgWFZFb9HhlfKI/jml3GhMZBWsZFirayyMMi8UKrdYN7ANPEB/6uV9iVtpLF5Kz8M2+GpI0EqRhPFAH2u3Q/RSgW8ei2ZbOY9NnbkdwuOjU93wgJxdY1Y93hvLYNe1i9QkSM1";
String data1 = "T3xbPEKEXV9+CbBw8D1B+N2jk8xwa55s0Bde48c49YBr4/b4yBwN2FIVZZn+Xg9KQTDoTCLu3YtByaWh7zPmdcpBr9FGARduhPrwSnYTFJ0VVVSK/UzPWdHN2YYd4yHGQRJ2HEr/1egt2JUHpWr0JA==";
/* {
"success": true,

@ -11,6 +11,10 @@ import org.springframework.stereotype.Component;
@Data
public class CommonSysConfig {
/**
* 图片地址
*/
private String fileUrl;
/**
* 普惠GO域名地址
*/

@ -1,7 +1,299 @@
package com.hfkj.dao;
import com.hfkj.entity.*;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* mapper扩展类
*/
public interface BsOrderMapperExt {
@Insert({
"<script>",
"insert into bs_order (user_id, user_name, ",
"user_phone, order_no, ",
"pay_channel, pay_channel_order_no, ",
"pay_serial_no, pay_type, ",
"total_price, pay_real_price, ",
"product_total_price, create_time, ",
"update_time, pay_time, ",
"finish_time, cancel_time, ",
"refund_time, order_status, ",
"remarks, ext_1, ext_2, ",
"ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.userId,jdbcType=BIGINT}, " +
"#{item.userName,jdbcType=VARCHAR}, ",
"#{item.userPhone,jdbcType=VARCHAR}, " +
"#{item.orderNo,jdbcType=VARCHAR}, ",
"#{item.payChannel,jdbcType=INTEGER}, " +
"#{item.payChannelOrderNo,jdbcType=VARCHAR}, ",
"#{item.paySerialNo,jdbcType=VARCHAR}, " +
"#{item.payType,jdbcType=INTEGER}, ",
"#{item.totalPrice,jdbcType=DECIMAL}, " +
"#{item.payRealPrice,jdbcType=DECIMAL}, ",
"#{item.productTotalPrice,jdbcType=DECIMAL}," +
"#{item.createTime,jdbcType=TIMESTAMP}, ",
"#{item.updateTime,jdbcType=TIMESTAMP}, " +
"#{item.payTime,jdbcType=TIMESTAMP}, ",
"#{item.finishTime,jdbcType=TIMESTAMP}, " +
"#{item.cancelTime,jdbcType=TIMESTAMP}, ",
"#{item.refundTime,jdbcType=TIMESTAMP}, " +
"#{item.orderStatus,jdbcType=INTEGER}, ",
"#{item.remarks,jdbcType=VARCHAR}, " +
"#{item.ext1,jdbcType=VARCHAR}, " +
"#{item.ext2,jdbcType=VARCHAR}, ",
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderBatch(@Param(value = "list") List<BsOrder> list);
@Insert({
"<script>",
"insert into bs_order_child (order_no, child_order_no, ",
"mer_id, product_type, ",
"product_id, product_name, ",
"product_img, product_spec_id, ",
"product_spec_name, product_price, ",
"product_count, product_total_price, ",
"total_deduction_price, coupon_discount_price, ",
"integral_discount_price, product_actual_price, ",
"surplus_refund_count, surplus_refund_price, ",
"surplus_refund_integral, `status`, ",
"settle_account, settle_account_key, ",
"create_time, update_time, ",
"finish_time, ext_1, ",
"ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.orderNo,jdbcType=VARCHAR}, " +
"#{item.childOrderNo,jdbcType=VARCHAR}, ",
"#{item.merId,jdbcType=BIGINT}, " +
"#{item.productType,jdbcType=INTEGER}, ",
"#{item.productId,jdbcType=BIGINT}, " +
"#{item.productName,jdbcType=VARCHAR}, ",
"#{item.productImg,jdbcType=VARCHAR}, " +
"#{item.productSpecId,jdbcType=BIGINT}, ",
"#{item.productSpecName,jdbcType=VARCHAR}, " +
"#{item.productPrice,jdbcType=DECIMAL}, ",
"#{item.productCount,jdbcType=INTEGER}, " +
"#{item.productTotalPrice,jdbcType=DECIMAL}, ",
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " +
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, ",
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, " +
"#{item.productActualPrice,jdbcType=DECIMAL}, ",
"#{item.surplusRefundCount,jdbcType=INTEGER}, " +
"#{item.surplusRefundPrice,jdbcType=DECIMAL}, ",
"#{item.surplusRefundIntegral,jdbcType=BIGINT}, " +
"#{item.status,jdbcType=INTEGER}, ",
"#{item.settleAccount,jdbcType=VARCHAR}," +
"#{item.settleAccountKey,jdbcType=VARCHAR}, ",
"#{item.createTime,jdbcType=TIMESTAMP}, " +
"#{item.updateTime,jdbcType=TIMESTAMP}, ",
"#{item.finishTime,jdbcType=TIMESTAMP}, " +
"#{item.ext1,jdbcType=VARCHAR}, ",
"#{item.ext2,jdbcType=VARCHAR}, " +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderChildBatch(@Param(value = "list") List<BsOrderChild> list);
@Insert({
"<script>",
"insert into bs_order_coupon (order_no, child_order_no, ",
"mer_id, user_id, user_phone, ",
"goods_id, goods_name, ",
"goods_type_id, goods_type_name, ",
"goods_brand_id, goods_brand_name, ",
"goods_specs_id, goods_specs_name, ",
"goods_spesc_original_price, goods_vpd_id, ",
"goods_vpd_key, goods_vpd_source, ",
"goods_count, total_price, ",
"total_deduction_price, coupon_discount_price, ",
"integral_discount_price, pay_real_price, ",
"pay_channel, pay_serial_no, ",
"pay_type, `status`, ",
"create_time, pay_time, ",
"cancel_time, refund_time, ",
"finish_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.orderNo,jdbcType=VARCHAR}, " +
"#{item.childOrderNo,jdbcType=VARCHAR}, ",
"#{item.merId,jdbcType=BIGINT}, " +
"#{item.userId,jdbcType=BIGINT}," +
"#{item.userPhone,jdbcType=VARCHAR}, ",
"#{item.goodsId,jdbcType=BIGINT}, " +
"#{item.goodsName,jdbcType=VARCHAR}, ",
"#{item.goodsTypeId,jdbcType=BIGINT}, " +
"#{item.goodsTypeName,jdbcType=VARCHAR}, ",
"#{item.goodsBrandId,jdbcType=BIGINT}, " +
"#{item.goodsBrandName,jdbcType=VARCHAR}, ",
"#{item.goodsSpecsId,jdbcType=BIGINT}, " +
"#{item.goodsSpecsName,jdbcType=VARCHAR}, ",
"#{item.goodsSpescOriginalPrice,jdbcType=DECIMAL}, " +
"#{item.goodsVpdId,jdbcType=BIGINT}, ",
"#{item.goodsVpdKey,jdbcType=VARCHAR}, " +
"#{item.goodsVpdSource,jdbcType=INTEGER}, ",
"#{item.goodsCount,jdbcType=INTEGER}, " +
"#{item.totalPrice,jdbcType=DECIMAL}, ",
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " +
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, ",
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, " +
"#{item.payRealPrice,jdbcType=DECIMAL}, ",
"#{item.payChannel,jdbcType=INTEGER}, " +
"#{item.paySerialNo,jdbcType=VARCHAR}, ",
"#{item.payType,jdbcType=INTEGER}, " +
"#{item.status,jdbcType=INTEGER}, ",
"#{item.createTime,jdbcType=TIMESTAMP}, " +
"#{item.payTime,jdbcType=TIMESTAMP}, ",
"#{item.cancelTime,jdbcType=TIMESTAMP}, " +
"#{item.refundTime,jdbcType=TIMESTAMP}, ",
"#{item.finishTime,jdbcType=TIMESTAMP}, " +
"#{item.updateTime,jdbcType=TIMESTAMP}, ",
"#{item.ext1,jdbcType=VARCHAR}, " +
"#{item.ext2,jdbcType=VARCHAR}, " +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderCouponBatch(@Param(value = "list") List<BsOrderCoupon> list);
@Insert({
"<script>",
"insert into bs_order_coupon_no (coupon_order_id, order_no, ",
"channel_order_no, goods_vpd_source, ",
"goods_vpd_key, goods_vpd_source_cou_no, ",
"expire_status, expire_time, ",
"`status`, exception_status, ",
"create_time, deliver_time, ",
"finish_time, update_time, ",
"ext_1, ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.couponOrderId,jdbcType=BIGINT}, " +
"#{item.orderNo,jdbcType=VARCHAR}, ",
"#{item.channelOrderNo,jdbcType=VARCHAR}, " +
"#{item.goodsVpdSource,jdbcType=INTEGER}, ",
"#{item.goodsVpdKey,jdbcType=VARCHAR}, " +
"#{item.goodsVpdSourceCouNo,jdbcType=VARCHAR}, ",
"#{item.expireStatus,jdbcType=BIT}, " +
"#{item.expireTime,jdbcType=TIMESTAMP}, ",
"#{item.status,jdbcType=INTEGER}, " +
"#{item.exceptionStatus,jdbcType=BIT}, ",
"#{item.createTime,jdbcType=TIMESTAMP}, " +
"#{item.deliverTime,jdbcType=TIMESTAMP}, ",
"#{item.finishTime,jdbcType=TIMESTAMP}, " +
"#{item.updateTime,jdbcType=TIMESTAMP}, ",
"#{item.ext1,jdbcType=VARCHAR}, " +
"#{item.ext2,jdbcType=VARCHAR}, " +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderCouponNoBatch(@Param(value = "list") List<BsOrderCouponNo> list);
@Insert({
"<script>",
"insert into bs_order_goods (logistics_no, freight_price, ",
"delivery_address_id, delivery_address, ",
"order_no, child_order_no, ",
"mer_id, user_id, user_phone, ",
"goods_id, img, goods_name, ",
"goods_type_id, goods_type_name, ",
"goods_brand_id, goods_brand_name, ",
"goods_specs_id, goods_specs_name, ",
"goods_specs_original_price, goods_count, ",
"total_price, total_deduction_price, ",
"coupon_discount_price, integral_discount_price, ",
"pay_real_price, pay_channel, ",
"pay_serial_no, pay_type, ",
"`status`, logistics_status_desc, ",
"logistics_status, create_time, ",
"pay_time, cancel_time, ",
"refund_time, finish_time, ",
"update_time, exception_status, ",
"exception_msg, ext_1, ",
"ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.logisticsNo,jdbcType=VARCHAR}, " +
"#{item.freightPrice,jdbcType=DECIMAL}, ",
"#{item.deliveryAddressId,jdbcType=BIGINT}, " +
"#{item.deliveryAddress,jdbcType=VARCHAR}, ",
"#{item.orderNo,jdbcType=VARCHAR}, " +
"#{item.childOrderNo,jdbcType=VARCHAR}, ",
"#{item.merId,jdbcType=BIGINT}, " +
"#{item.userId,jdbcType=BIGINT}, " +
"#{item.userPhone,jdbcType=VARCHAR}, ",
"#{item.goodsId,jdbcType=BIGINT}, " +
"#{item.img,jdbcType=VARCHAR}, " +
"#{item.goodsName,jdbcType=VARCHAR}, ",
"#{item.goodsTypeId,jdbcType=BIGINT}, " +
"#{item.goodsTypeName,jdbcType=VARCHAR}, ",
"#{item.goodsBrandId,jdbcType=BIGINT}, " +
"#{item.goodsBrandName,jdbcType=VARCHAR}, ",
"#{item.goodsSpecsId,jdbcType=BIGINT}, " +
"#{item.goodsSpecsName,jdbcType=VARCHAR}, ",
"#{item.goodsSpecsOriginalPrice,jdbcType=DECIMAL}, " +
"#{item.goodsCount,jdbcType=INTEGER}, ",
"#{item.totalPrice,jdbcType=DECIMAL}, " +
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, ",
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, " +
"#{item.integralDiscountPrice,jdbcType=DECIMAL}, ",
"#{item.payRealPrice,jdbcType=DECIMAL}, " +
"#{item.payChannel,jdbcType=INTEGER}, ",
"#{item.paySerialNo,jdbcType=VARCHAR}, " +
"#{item.payType,jdbcType=INTEGER}, ",
"#{item.status,jdbcType=INTEGER}, " +
"#{item.logisticsStatusDesc,jdbcType=VARCHAR}, ",
"#{item.logisticsStatus,jdbcType=VARCHAR}, " +
"#{item.createTime,jdbcType=TIMESTAMP}, ",
"#{item.payTime,jdbcType=TIMESTAMP}, " +
"#{item.cancelTime,jdbcType=TIMESTAMP}, ",
"#{item.refundTime,jdbcType=TIMESTAMP}, " +
"#{item.finishTime,jdbcType=TIMESTAMP}, ",
"#{item.updateTime,jdbcType=TIMESTAMP}, " +
"#{item.exceptionStatus,jdbcType=BIT}, ",
"#{item.exceptionMsg,jdbcType=VARCHAR}, " +
"#{item.ext1,jdbcType=VARCHAR}, ",
"#{item.ext2,jdbcType=VARCHAR}, " +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderGoodsBatch(@Param(value = "list") List<BsOrderGoods> list);
@Insert({
"<script>",
"insert into bs_order_deduction (order_id, order_no, ",
"total_deduction_price, user_coupon_discount_id, ",
"coupon_discount_id, coupon_discount_type, ",
"coupon_discount_price, coupon_discount_actual_price, ",
"integral_discount_price, ext_1, ",
"ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.orderId,jdbcType=BIGINT}, " +
"#{item.orderNo,jdbcType=VARCHAR}, ",
"#{item.totalDeductionPrice,jdbcType=DECIMAL}, " +
"#{item.userCouponDiscountId,jdbcType=BIGINT}, ",
"#{item.couponDiscountId,jdbcType=BIGINT}, " +
"#{item.couponDiscountType,jdbcType=INTEGER}, ",
"#{item.couponDiscountPrice,jdbcType=DECIMAL}, " +
"#{item.couponDiscountActualPrice,jdbcType=DECIMAL}, ",
"#{item.integralDiscountPrice,jdbcType=BIGINT}, " +
"#{item.ext1,jdbcType=VARCHAR}, ",
"#{item.ext2,jdbcType=VARCHAR}, " +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertOrderDeductionBatch(@Param(value = "list") List<BsOrderDeduction> list);
}

@ -1,7 +1,56 @@
package com.hfkj.dao;
import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserCard;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* mapper扩展类
*/
public interface BsUserCardMapperExt {
@Insert({
"<script>",
"insert into bs_user_card (user_id, `type`, ",
"card_no, `status`, ",
"create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.userId,jdbcType=BIGINT}, " +
"#{item.type,jdbcType=INTEGER}, ",
"#{item.cardNo,jdbcType=VARCHAR}, " +
"#{item.status,jdbcType=INTEGER}, ",
"#{item.createTime,jdbcType=TIMESTAMP}, ",
"#{item.updateTime,jdbcType=TIMESTAMP}, " +
"#{item.ext1,jdbcType=VARCHAR}, ",
"#{item.ext2,jdbcType=VARCHAR}," +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertUserCardList(@Param(value = "list") List<BsUserCard> list);
@Update({
"<script>",
"<foreach collection='list' item='item' separator=';'>",
"update bs_user_card set " +
"user_id = #{item.userId}, ",
"type = #{item.type}, " +
"card_no = #{item.cardNo}, ",
"status = #{item.status}, " +
"create_time = #{item.createTime}, ",
"update_time = #{item.updateTime}, " +
"ext_1 = #{item.ext1}, ",
"ext_2 = #{item.ext2}," +
"ext_3 = #{item.ext3} where id=#{item.id}",
"</foreach>",
"</script>"
})
void updateUserCardList(@Param(value = "list") List<BsUserCard> list);
}

@ -1,7 +1,71 @@
package com.hfkj.dao;
import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserCard;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.Update;
import java.util.List;
/**
* mapper扩展类
*/
public interface BsUserMapperExt {
@Insert({
"<script>",
"insert into bs_user (head_img, `name`, ",
"phone, `password`, ",
"integral, `status`, ",
"wx_mp_openid, wx_ma_openid, ",
"outside_openid, create_time, ",
"update_time, ext_1, ",
"ext_2, ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.headImg,jdbcType=VARCHAR}, " +
"#{item.name,jdbcType=VARCHAR}, ",
"#{item.phone,jdbcType=VARCHAR}, " +
"#{item.password,jdbcType=VARCHAR}, ",
"#{item.integral,jdbcType=BIGINT}, " +
"#{item.status,jdbcType=INTEGER}, ",
"#{item.wxMpOpenid,jdbcType=VARCHAR}, " +
"#{item.wxMaOpenid,jdbcType=VARCHAR}, ",
"#{item.outsideOpenid,jdbcType=VARCHAR}, " +
"#{item.createTime,jdbcType=TIMESTAMP}, ",
"#{item.updateTime,jdbcType=TIMESTAMP}, " +
"#{item.ext1,jdbcType=VARCHAR}, ",
"#{item.ext2,jdbcType=VARCHAR}," +
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertUserList(@Param(value = "list") List<BsUser> list);
@Update({
"<script>",
"<foreach collection='list' item='item' separator=';'>",
"update bs_user set " +
"head_img = #{item.headImg}, " +
"name = #{item.name}, ",
"phone = #{item.phone}, " +
"password = #{item.password}, ",
"integral = #{item.integral}, ",
"status = #{item.status}, " +
"wx_mp_openid = #{item.wxMpOpenid}, " +
"wx_ma_openid = #{item.wxMaOpenid}, " +
"outside_openid = #{item.outsideOpenid}, " +
"create_time = #{item.createTime}, ",
"update_time = #{item.updateTime}, " +
"ext_1 = #{item.ext1}, ",
"ext_2 = #{item.ext2}," +
"ext_3 = #{item.ext3} where id=#{item.id}",
"</foreach>",
"</script>"
})
void updateUserList(@Param(value = "list") List<BsUser> list);
}

@ -46,7 +46,8 @@ public interface GoodsUserAddressMapper extends GoodsUserAddressMapperExt {
"update_time, op_id, ",
"op_name, ext_1, ext_2, ",
"ext_3)",
"values (#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ",
"values " +
"(#{userId,jdbcType=BIGINT}, #{consignee,jdbcType=VARCHAR}, ",
"#{phone,jdbcType=VARCHAR}, #{address,jdbcType=VARCHAR}, ",
"#{regionId,jdbcType=VARCHAR}, #{regionName,jdbcType=VARCHAR}, ",
"#{whetherDefault,jdbcType=BIT}, #{createTime,jdbcType=TIMESTAMP}, ",

@ -1,7 +1,45 @@
package com.hfkj.dao;
import com.hfkj.entity.BsUser;
import com.hfkj.entity.GoodsUserAddress;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import java.util.List;
/**
* mapper扩展类
*/
public interface GoodsUserAddressMapperExt {
@Insert({
"<script>",
"insert into goods_user_address (user_id, consignee, ",
"phone, address, ",
"region_id, region_name, ",
"whether_default, create_time, ",
"update_time, op_id, ",
"op_name, ext_1, ext_2, ",
"ext_3)",
"values ",
"<foreach collection='list' item='item' index='index' separator=','>",
"(#{item.userId,jdbcType=BIGINT}, " +
"#{item.consignee,jdbcType=VARCHAR}, ",
"#{item.phone,jdbcType=VARCHAR}, " +
"#{item.address,jdbcType=VARCHAR}, ",
"#{item.regionId,jdbcType=VARCHAR}, " +
"#{item.regionName,jdbcType=VARCHAR}, ",
"#{item.whetherDefault,jdbcType=BIT}, " +
"#{item.createTime,jdbcType=TIMESTAMP}, ",
"#{item.updateTime,jdbcType=TIMESTAMP}, " +
"#{item.opId,jdbcType=BIGINT}, ",
"#{item.opName,jdbcType=VARCHAR}, " +
"#{item.ext1,jdbcType=VARCHAR}, " +
"#{item.ext2,jdbcType=VARCHAR}, ",
"#{item.ext3,jdbcType=VARCHAR})",
"</foreach>",
"</script>"
})
void insertAddressList(@Param(value = "list") List<GoodsUserAddress> list);
}

@ -17,6 +17,16 @@ public interface CommonService {
*/
List<BsCity> getCityList(Long parentId);
/**
* @MethodName getCityListAll
* @Description: 查询所有城市
* @param
* @return: java.util.List<com.hfkj.entity.BsCity>
* @Author: Sum1Dream
* @Date: 2024/7/25 下午3:29
*/
List<BsCity> getCityListAll();
/**
* @Author Sum1Dream

@ -1,10 +1,12 @@
package com.hfkj.service.card;
import com.hfkj.entity.BsUser;
import com.hfkj.entity.BsUserCard;
import com.hfkj.sysenum.UserCardStatusEnum;
import com.hfkj.sysenum.UserCardTypeEnum;
import java.util.List;
import java.util.Map;
/**
* @className: BsUserCardService
@ -26,6 +28,24 @@ public interface BsUserCardService {
*/
BsUserCard getCard(String cardNo);
/**
* @MethodName insertUserCardBatch
* @Description: 批量插入工会卡
* @param data
* @Author: Sum1Dream
* @Date: 2024/7/25 上午9:58
*/
void insertUserCardBatch(List<BsUserCard> data);
/**
* @MethodName updateUserCardBatch
* @Description:批量更新工会卡
* @param data
* @Author: Sum1Dream
* @Date: 2024/7/25 上午9:58
*/
void updateUserCardBatch(List<BsUserCard> data);
/**
* 查询卡
* @param userId
@ -41,6 +61,9 @@ public interface BsUserCardService {
*/
List<BsUserCard> getCardList(Long userId, UserCardTypeEnum type);
List<BsUserCard> getCardList(Map<String , Object> map);
/**
* 绑定卡号
* @param type

@ -16,8 +16,10 @@ import org.apache.commons.lang3.StringUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
/**
* @className: BsUserCardServiceImpl
@ -36,6 +38,7 @@ public class BsUserCardServiceImpl implements BsUserCardService {
if (data.getId() == null) {
data.setCreateTime(new Date());
userCardMapper.insert(data);
} else {
userCardMapper.updateByPrimaryKeySelective(data);
}
@ -52,6 +55,16 @@ public class BsUserCardServiceImpl implements BsUserCardService {
return null;
}
@Override
public void insertUserCardBatch(List<BsUserCard> data) {
userCardMapper.insertUserCardList(data);
}
@Override
public void updateUserCardBatch(List<BsUserCard> data) {
userCardMapper.updateUserCardList(data);
}
@Override
public BsUserCard getCard(Long userId, String cardNo) {
BsUserCardExample example = new BsUserCardExample();
@ -79,6 +92,13 @@ public class BsUserCardServiceImpl implements BsUserCardService {
return userCardMapper.selectByExample(example);
}
@Override
public List<BsUserCard> getCardList(Map<String, Object> map) {
BsUserCardExample example = new BsUserCardExample();
BsUserCardExample.Criteria criteria = example.createCriteria();
return userCardMapper.selectByExample(example);
}
@Override
public void bindCard(UserCardTypeEnum type, Long userId, String cardNo) throws Exception {
if (UserCardTypeEnum.type1.getCode() == type.getCode()) {

@ -31,6 +31,15 @@ public interface BsOrderCouponNoService {
* @return
*/
List<BsOrderCouponNo> getListByCouponOrderId(Long couponOrderId);
/**
* @MethodName getListByOrderNo
* @Description:
* @param orderNo
* @return: com.hfkj.entity.BsOrderCouponNo
* @Author: Sum1Dream
* @Date: 2024/7/30 下午2:39
*/
BsOrderCouponNo getListByOrderNo(String orderNo);
/**
* 查询列表

@ -8,6 +8,7 @@ import org.apache.commons.collections4.MapUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.Collections;
import java.util.Date;
import java.util.List;
import java.util.Map;
@ -51,6 +52,18 @@ public class BsOrderCouponNoServiceImpl implements BsOrderCouponNoService {
return orderCouponNoMapper.selectByExample(example);
}
@Override
public BsOrderCouponNo getListByOrderNo(String orderNo) {
BsOrderCouponNoExample example = new BsOrderCouponNoExample();
example.createCriteria().andExt1EqualTo(orderNo);
example.setOrderByClause("create_time desc");
List<BsOrderCouponNo> list = orderCouponNoMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public List<BsOrderCouponNo> getList(Map<String, Object> param) {
BsOrderCouponNoExample example = new BsOrderCouponNoExample();

@ -58,6 +58,16 @@ public interface BsOrderGoodsService {
*/
BsOrderGoods findGoodsOrder(String orderNo);
/**
* @MethodName findGoodsOrderByChild
* @Description:
* @param orderChildNo
* @return: com.hfkj.entity.BsOrderGoods
* @Author: Sum1Dream
* @Date: 2024/7/31 上午10:37
*/
BsOrderGoods findGoodsOrderByChild(String orderChildNo);
/**
* @Author Sum1Dream
* @Name queryDetailByMap

@ -74,4 +74,13 @@ public interface GoodsUserAddressService {
* @Return void
*/
void cleanDeliveryAddressDefault(Long userId);
/**
* @MethodName insertUserAddressBatch
* @Description: 批量新增
* @param list
* @Author: Sum1Dream
* @Date: 2024/7/25 下午3:11
*/
void insertUserAddressBatch(List<GoodsUserAddress> list);
}

@ -81,6 +81,20 @@ public class BsOrderGoodsServiceImpl implements BsOrderGoodsService {
return null;
}
@Override
public BsOrderGoods findGoodsOrderByChild(String orderChildNo) {
BsOrderGoodsExample example = new BsOrderGoodsExample();
example.createCriteria().andStatusNotEqualTo(0).andChildOrderNoEqualTo(orderChildNo);
List<BsOrderGoods> list = bsOrderGoodsMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public BsOrderGoods queryDetail(Long id) {
return bsOrderGoodsMapper.selectByPrimaryKey(id);

@ -84,4 +84,9 @@ public class GoodsUserAddressServiceImpl implements GoodsUserAddressService {
}
}
}
@Override
public void insertUserAddressBatch(List<GoodsUserAddress> list) {
goodsUserAddressMapper.insertAddressList(list);
}
}

@ -69,6 +69,6 @@ public class GoodsVpdServiceImpl implements GoodsVpdService {
@Override
public List<GoodsVpd> getList(Map<String, Object> map) {
return Collections.emptyList();
return goodsVpdMapper.selectByExample(new GoodsVpdExample());
}
}

@ -0,0 +1,52 @@
package com.hfkj.service.hlt;
import com.alibaba.fastjson.JSONObject;
import java.util.HashMap;
import java.util.Map;
/**
* @ClassName HltCanteenService
* @Author Sum1Dream
* @Description 汇联通食堂功能
* @Date 2024/7/30 下午5:31
**/
public class HltCanteenService {
/**
* @MethodName canteenConsume
* @Description: 食堂消费
* @param orderNo
* @param cardNo
* @param instCode
* @param canteenId
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/7/30 下午5:36
*/
public static JSONObject canteenConsume(String orderNo , String cardNo , String instCode , String canteenId) throws Exception {
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("orderNo", orderNo);
dataMap.put("consumeType", 3);
dataMap.put("cardNo", cardNo);
dataMap.put("instCode", instCode);
dataMap.put("canteenId", canteenId);
return HuiLianTongUnionCardService.request("canteen/canteenConsume", dataMap);
}
/**
* @MethodName queryCanteenOrder
* @Description:查询食堂消费记录
* @param cardNo
* @return: com.alibaba.fastjson.JSONObject
* @Author: Sum1Dream
* @Date: 2024/7/30 下午5:38
*/
public static JSONObject queryCanteenOrder(String cardNo) throws Exception {
Map<String,Object> dataMap = new HashMap<>();
dataMap.put("cardNo", cardNo);
dataMap.put("page", 1);
dataMap.put("pageSize", 100000);
return HuiLianTongUnionCardService.request("canteen/queryCanteenOrder", dataMap);
}
}

@ -33,6 +33,16 @@ public class CommonServiceImpl implements CommonService {
return bsCityMapper.selectByExample(example);
}
@Override
public List<BsCity> getCityListAll() {
BsCityExample example = new BsCityExample();
BsCityExample.Criteria criteria = example.createCriteria();
criteria.andStatusEqualTo(1);
return bsCityMapper.selectByExample(example);
}
@Override
public List<JSONObject> getCity(String code, String name, String child) {

@ -11,6 +11,7 @@ import com.hfkj.entity.*;
import com.hfkj.model.order.OrderChildModel;
import com.hfkj.model.order.OrderModel;
import com.hfkj.qianzhu.channel.CinemaService;
import com.hfkj.service.BsMerService;
import com.hfkj.service.BsProductConfigService;
import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
@ -207,6 +208,8 @@ public class OrderCreateService {
jsonObject = new JSONObject((Map<String, Object>) orderChild.getBusiness());
}
jsonObject.put("address", address);
// 创建实物订单
@ -214,6 +217,7 @@ public class OrderCreateService {
orderGoods.setOrderNo(orderChild.getOrderNo());
orderGoods.setChildOrderNo(orderChild.getChildOrderNo());
orderGoods.setMerId(orderChild.getMerId());
orderGoods.setMerName(goodsMsg.getMerName());
orderGoods.setUserId(order.getUserId());
orderGoods.setUserPhone(order.getUserPhone());
orderGoods.setGoodsId(goodsMsg.getId());

@ -196,13 +196,14 @@ public class OrderPaySuccessService {
* @param order
*/
public void goods(OrderModel order, BsOrderChild childOrder) {
BsOrderGoods goodsOrder = bsOrderGoodsService.findGoodsOrder(order.getOrderNo());
BsOrderGoods goodsOrder = bsOrderGoodsService.findGoodsOrderByChild(childOrder.getChildOrderNo());
try {
if (goodsOrder == null) {
throw ErrorHelp.genException(SysCode.System , ErrorCode.COMMON_ERROR , "未查询到相关内容");
}
goodsMsgService.editSaleNum(goodsOrder.getGoodsId() , goodsOrder.getGoodsCount() , 1);
goodsOrder.setTotalPrice(childOrder.getProductTotalPrice());
@ -266,6 +267,7 @@ public class OrderPaySuccessService {
orderCinema.setPayTime(order.getPayTime());
orderCinema.setUpdateTime(new Date());
orderCinema.setStatus(OrderCinemaStatusEnum.status5.getCode());
bsOrderCinemaService.update(orderCinema);
} catch (Exception e) {
if (orderCinema == null) {
@ -273,7 +275,6 @@ public class OrderPaySuccessService {
}
orderCinema.setExceptionStatus(true);
orderCinema.setExceptionMsg(e.getMessage());
} finally {
bsOrderCinemaService.update(orderCinema);
}

@ -18,10 +18,7 @@ import org.springframework.beans.BeanUtils;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.util.Map;
import java.util.*;
/**
* @className: BsOrderChildServiceImpl
@ -82,7 +79,15 @@ public class BsOrderChildServiceImpl implements BsOrderChildService {
if (childModel.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
BsOrderGoods orderGoods = orderGoodsService.findGoodsOrder(orderNo);
if (orderGoods != null) {
GoodsUserAddress address = goodsUserAddressService.queryDetail(orderGoods.getDeliveryAddressId());
GoodsUserAddress address;
if (orderGoods.getDeliveryAddressId() != null) {
address = goodsUserAddressService.queryDetail(orderGoods.getDeliveryAddressId());
} else {
Map<String , Object> map = new HashMap<>();
map.put("userId" , orderGoods.getUserId());
address = goodsUserAddressService.queryDetailByMap(map);
}
JSONObject object;
if (childModel.getBusiness() == null) {
object = new JSONObject();

@ -16,11 +16,15 @@ import com.hfkj.model.order.OrderModel;
import com.hfkj.mqtopic.OrderTopic;
import com.hfkj.qianzhu.channel.CinemaService;
import com.hfkj.service.BsProductConfigService;
import com.hfkj.service.coupon.BsOrderCouponNoService;
import com.hfkj.service.coupon.BsOrderCouponService;
import com.hfkj.service.discount.CouponDiscountService;
import com.hfkj.service.discount.CouponDiscountUserRelService;
import com.hfkj.service.goods.BsOrderCinemaService;
import com.hfkj.service.goods.BsOrderGoodsService;
import com.hfkj.service.order.*;
import com.hfkj.service.user.UserIntegralService;
import com.hfkj.service.user.impl.PhgDataUserServiceImpl;
import com.hfkj.sysenum.UserIntegralRecordOpUserTypeEnum;
import com.hfkj.sysenum.UserIntegralRecordSourceTypeEnum;
import com.hfkj.sysenum.order.OrderChildProductTypeEnum;
@ -87,7 +91,14 @@ public class BsOrderServiceImpl implements BsOrderService {
private BsOrderCinemaService bsOrderCinemaService;
@Resource
private BsProductConfigService productConfigService;
@Resource
private PhgDataUserServiceImpl phgDataUserService;
@Resource
private BsOrderGoodsService bsOrderGoodsService;
@Resource
private BsOrderCouponService bsOrderCouponService;
@Resource
private BsOrderCouponNoService bsOrderCouponNoService;
@Override
@ -261,9 +272,9 @@ public class BsOrderServiceImpl implements BsOrderService {
}
// TODO 临时多商户支付功能限制
if (order.getOrderChildList().stream().collect(Collectors.groupingBy(BsOrderChild::getMerId, Collectors.toList())).size() > 1) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂不支持多商户商品下单");
}
// if (order.getOrderChildList().stream().collect(Collectors.groupingBy(BsOrderChild::getMerId, Collectors.toList())).size() > 1) {
// throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂不支持多商户商品下单");
// }
if (order.getPayRealPrice().compareTo(new BigDecimal("0")) <= 0) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "当前不支持0元购买");
@ -481,7 +492,7 @@ public class BsOrderServiceImpl implements BsOrderService {
}
@Override
public OrderModel getDetail(String orderNo){
public OrderModel getDetail(String orderNo){
OrderModel orderModel = new OrderModel();
BeanUtils.copyProperties(getOrder(orderNo), orderModel);
@ -493,9 +504,11 @@ public class BsOrderServiceImpl implements BsOrderService {
// todo 1.0阶段暂时需要返回收货地址使用
for (OrderChildModel orderChild : orderModel.getOrderChildList()) {
if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
orderModel.setBusiness(orderChild.getBusiness());
}
if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type1.getCode())) {
orderModel.setBusiness(orderChild.getBusiness());
}
if (orderChild.getProductType().equals(OrderChildProductTypeEnum.type3.getCode())) {
BsOrderCinema bsOrderCinema = bsOrderCinemaService.findGoodsOrder(orderNo);

@ -21,6 +21,24 @@ public interface BsUserService {
*/
void editData(BsUser data);
/**
* @MethodName insertUserBatch
* @Description: 批量插入
* @param data
* @Author: Sum1Dream
* @Date: 2024/7/24 下午5:38
*/
void insertUserBatch(List<BsUser> data);
/**
* @MethodName updateUserBatch
* @Description: 批量更新
* @param data
* @Author: Sum1Dream
* @Date: 2024/7/24 下午5:38
*/
void updateUserBatch(List<BsUser> data);
/**
* 获取用户
* @param userId 用户id
@ -35,6 +53,9 @@ public interface BsUserService {
*/
BsUser getUser(String phone);
BsUser getUserByMaOpenId(String maOpenId);
/**
* 获取用户
* @param vFamilyOpenid 手机号

@ -0,0 +1,42 @@
package com.hfkj.service.user;
import com.hfkj.entity.*;
import java.util.List;
import java.util.Map;
public interface PhgDataUserService {
/**
* @MethodName queryDetail
* @Description:
* @param id
* @return: com.hfkj.entity.CyymallUser
* @Author: Sum1Dream
* @Date: 2024/7/22 下午3:29
*/
CyymallUser queryDetail(Integer id);
List<CyymallUser> getList(Map<String , Object> map);
List<CyymallOrder> getListOrder(Map<String , Object> map);
List<CyymallOrderDetail> getListOrderDetail();
CyymallOrderDetail getDetail(Integer id);
List<CyymallAddress> getAddressList();
CyymallGoods findGoods(Integer id);
List<CyymallGoods> getListGoods();
void insertOrderBatch(List<BsOrder> list);
void insertOrderChildBatch(List<BsOrderChild> list);
void insertOrderCouponBatch(List<BsOrderCoupon> list);
void insertOrderCouponNoBatch(List<BsOrderCouponNo> list);
void insertOrderGoodsBatch(List<BsOrderGoods> list);
void insertOrderDeductionBatch(List<BsOrderDeduction> list);
String downloadImage(String imageUrl);
}

@ -60,6 +60,16 @@ public class BsUserServiceImpl implements BsUserService {
}
}
@Override
public void insertUserBatch(List<BsUser> data) {
userMapper.insertUserList(data);
}
@Override
public void updateUserBatch(List<BsUser> data) {
userMapper.updateUserList(data);
}
@Override
public BsUser getUser(Long userId) {
return userMapper.selectByPrimaryKey(userId);
@ -78,6 +88,19 @@ public class BsUserServiceImpl implements BsUserService {
return null;
}
@Override
public BsUser getUserByMaOpenId(String maOpenId) {
BsUserExample example = new BsUserExample();
example.createCriteria()
.andWxMaOpenidEqualTo(maOpenId)
.andStatusNotEqualTo(UserStatusEnum.status0.getCode());
List<BsUser> list = userMapper.selectByExample(example);
if (!list.isEmpty()) {
return list.get(0);
}
return null;
}
@Override
public BsUser getUserByOutsideOpenid(String outsideOpenid) {
BsUserExample example = new BsUserExample();
@ -158,7 +181,13 @@ public class BsUserServiceImpl implements BsUserService {
// 查询用户
BsUser user = getUser(phone);
if (user == null) {
user = register(phone, password, other);
// 查询用户
user = getUserByMaOpenId(other.get("maOpenId").toString());
if (user == null) {
user = register(phone, password, other);
}
user.setPhone(phone);
editData(user);
}
// 缓存

@ -0,0 +1,182 @@
package com.hfkj.service.user.impl;
import com.hfkj.common.obs.HuaWeiYunObs;
import com.hfkj.common.utils.DateUtil;
import com.hfkj.config.CommonSysConst;
import com.hfkj.dao.*;
import com.hfkj.entity.*;
import com.hfkj.service.user.PhgDataUserService;
import org.apache.commons.collections4.MapUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.io.*;
import java.net.URL;
import java.net.URLConnection;
import java.util.*;
@Service("phgDataUserService")
public class PhgDataUserServiceImpl implements PhgDataUserService {
@Resource
private CyymallUserMapper cyymallUserMapper;
@Resource
private CyymallOrderMapper cyymallOrderMapper;
@Resource
private CyymallOrderDetailMapper cyymallOrderDetailMapper;
@Resource
private CyymallAddressMapper cyymallAddressMapper;
@Resource
private CyymallGoodsMapper cyymallGoodsMapper;
@Resource
private BsOrderMapper orderMapper;
@Qualifier("bsOrderMapperExt")
@Resource
private BsOrderMapperExt bsOrderMapperExt;
@Override
public CyymallUser queryDetail(Integer id) {
return cyymallUserMapper.selectByPrimaryKey(id);
}
@Override
public List<CyymallUser> getList(Map<String, Object> map) {
CyymallUserExample example = new CyymallUserExample();
CyymallUserExample.Criteria criteria = example.createCriteria();
if (MapUtils.getShort(map, "type") != null) {
criteria.andTypeEqualTo(MapUtils.getShort(map, "type"));
}
return cyymallUserMapper.selectByExample(example);
}
@Override
public List<CyymallOrder> getListOrder(Map<String, Object> map) {
CyymallOrderExample example = new CyymallOrderExample();
CyymallOrderExample.Criteria criteria = example.createCriteria();
if (MapUtils.getLong(map, "userId") != null) {
criteria.andUserIdEqualTo(MapUtils.getInteger(map, "type"));
}
if (MapUtils.getShort(map, "isPay") != null) {
criteria.andIsPayEqualTo(MapUtils.getShort(map, "isPay"));
}
if (MapUtils.getShort(map, "applyDelete") != null) {
criteria.andApplyDeleteEqualTo(MapUtils.getShort(map, "applyDelete"));
}
return cyymallOrderMapper.selectByExample(example);
}
@Override
public List<CyymallOrderDetail> getListOrderDetail() {
return cyymallOrderDetailMapper.selectByExample(new CyymallOrderDetailExample());
}
@Override
public CyymallOrderDetail getDetail(Integer id) {
return cyymallOrderDetailMapper.selectByPrimaryKey(id);
}
@Override
public List<CyymallAddress> getAddressList() {
CyymallAddressExample example = new CyymallAddressExample();
CyymallAddressExample.Criteria criteria = example.createCriteria();
return cyymallAddressMapper.selectByExample(example);
}
@Override
public CyymallGoods findGoods(Integer id) {
return cyymallGoodsMapper.selectByPrimaryKey(id);
}
@Override
public List<CyymallGoods> getListGoods() {
return cyymallGoodsMapper.selectByExample(new CyymallGoodsExample());
}
@Override
public void insertOrderBatch(List<BsOrder> list) {
bsOrderMapperExt.insertOrderBatch(list);
}
@Override
public void insertOrderChildBatch(List<BsOrderChild> list) {
bsOrderMapperExt.insertOrderChildBatch(list);
}
@Override
public void insertOrderCouponBatch(List<BsOrderCoupon> list) {
bsOrderMapperExt.insertOrderCouponBatch(list);
}
@Override
public void insertOrderCouponNoBatch(List<BsOrderCouponNo> list) {
bsOrderMapperExt.insertOrderCouponNoBatch(list);
}
@Override
public void insertOrderGoodsBatch(List<BsOrderGoods> list) {
bsOrderMapperExt.insertOrderGoodsBatch(list);
}
@Override
public void insertOrderDeductionBatch(List<BsOrderDeduction> list) {
bsOrderMapperExt.insertOrderDeductionBatch(list);
}
@Override
public String downloadImage(String imageUrl) {
try {
URL url = new URL(imageUrl);
URLConnection connection = url.openConnection();
InputStream inputStream = connection.getInputStream();
BufferedInputStream bufferedInputStream = new BufferedInputStream(inputStream);
// 创建图片路径
String fileName = System.currentTimeMillis() + ".png";
String childPath = DateUtil.date2String(new Date(), "yyyyMM");
String destDirName = CommonSysConst.getSysConfig().getFileUrl() + File.separator + childPath;
// 创建文件夹
File dir = new File(destDirName);
if (!dir.exists()) {
dir.mkdirs();
}
FileOutputStream fileOutputStream = new FileOutputStream(destDirName + File.separator + fileName);
byte[] buffer = new byte[1024];
int bytesRead;
while ((bytesRead = bufferedInputStream.read(buffer)) != -1) {
fileOutputStream.write(buffer, 0, bytesRead);
fileOutputStream.flush();
}
HuaWeiYunObs.putObject(CommonSysConst.getSysConfig().getObsBucketName(),
childPath + "/" + fileName, new File(destDirName + "/" + fileName));
fileOutputStream.close();
bufferedInputStream.close();
inputStream.close();
return childPath + "/" + fileName;
} catch (IOException ioException) {
ioException.printStackTrace();
}
return null;
}
}

@ -1,11 +1,11 @@
fileUrl=/Users/chenyao/Desktop/img
domainName=https://phgcs.dctpay.com
wechatMpAppid=wxa075e8509802f826
wechatMpSecret=0e606fc1378d35e359fcf3f15570b2c5
wechatMpSecret=0e606fc1378d35e359fcf3f15570b2c51
wechatMaAppid=wx8d49e2f83025229d
wechatMaSecret=d8d6dcaef77d3b659258a01b5ddba5df
wechatMaAppid=wx785ac6bc8daa0f88
wechatMaSecret=81c5f13b7c5372b31e04814c86ae97d8
obsBucketName=phg-test
obsEndPoint=https://obs.cn-southwest-2.myhuaweicloud.com
@ -58,11 +58,11 @@ huiftShopCode=50041b27-f985-dcb0-1cc0-f106b09bf1fe
huiftSignSecret=DB4D8069A9AC6DDF9D75667EE5CF182A
#QIANZHU
qianZhuUrl=https://live-test.qianzhu8.com
qianzhuH5url=https://nf-test.qianzhu8.com/gateway
qianZhuPlatformId=10376
qianZhuSecret=ktxb49sh2jfhgn8g
qianZhuCinemaNotify=https://phgcs.dctpay.com/order/cinemaNotify/notify
qianZhuUrl=https://live.qianzhu8.com
qianzhuH5url=https://nf.qianzhu8.com/gateway
qianZhuPlatformId=10710
qianZhuSecret=pgmh5j1cbq2brm08
qianZhuCinemaNotify=https://phg.dctpay.com/order/cinemaNotify/notify
#CT
ctNotifyUrl = 1

@ -1,11 +1,11 @@
fileUrl=/home/project/phg/filesystem
domainName=https://phg.dctpay.com
wechatMpAppid=wxa075e8509802f826
wechatMpSecret=0e606fc1378d35e359fcf3f15570b2c5
wechatMaAppid=wx8d49e2f83025229d
wechatMaSecret=d8d6dcaef77d3b659258a01b5ddba5df
wechatMaAppid=wx785ac6bc8daa0f88
wechatMaSecret=81c5f13b7c5372b31e04814c86ae97d8
obsBucketName=phg
obsEndPoint=https://obs.cn-southwest-2.myhuaweicloud.com

@ -14,7 +14,6 @@ import com.hfkj.entity.BsUserComplaint;
import com.hfkj.model.ResponseData;
import com.hfkj.model.SecUserSessionObject;
import com.hfkj.model.UserSessionObject;
import com.hfkj.service.SecUserService;
import com.hfkj.service.user.BsUserComplaintService;
import com.hfkj.service.user.BsUserService;
import com.hfkj.service.user.impl.BsUserServiceImpl;
@ -23,17 +22,14 @@ import com.hfkj.sysenum.UserLoginPlatform;
import com.hfkj.sysenum.UserLoginType;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.User;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.context.annotation.Description;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
@ -122,7 +118,6 @@ public class BsUserController {
}
}
@RequestMapping(value = "/outsideOpenid", method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "外部openid登录")
@ -144,7 +139,7 @@ public class BsUserController {
log.error("LoginController --> phone() error!", "未知客户端");
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未知客户端");
}
// 登录类型
//
UserLoginType loginType = UserLoginType.getDataByType(body.getString("type"));
if (loginType == null) {
log.error("LoginController --> phone() error!", "未知登录类型;" + body.getString("type"));
@ -277,11 +272,12 @@ public class BsUserController {
BsUser bsUser = userSession.getUser();
bsUser.setHeadImg(body.getHeadImg());
bsUser.setName(body.getName());
bsUser.setPhone(body.getPhone());
userService.editData(bsUser);
return ResponseMsgUtil.success("修改成功");
// 更新登录信息
return ResponseMsgUtil.success(userService.updateSession(bsUser.getId()));
} catch (Exception e) {
log.error("LoginController --> wechatMaPhone() error!", e);

@ -9,7 +9,7 @@ debug: false
#datasource数据源设置
spring:
datasource:
url: jdbc:mysql://139.9.154.68:3306/hsg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
url: jdbc:mysql://139.9.154.68:3306/phg_pre?allowMultiQueries=true&useUnicode=true&characterEncoding=UTF-8&useSSL=false
username: root
password: HF123456.
type: com.alibaba.druid.pool.DruidDataSource

@ -1,2 +1,2 @@
fileUrl=/home/project/hsg/filesystem
cmsPath=/home/project/hsg/filesystem/cmsPath
fileUrl=/home/project/phg/filesystem
cmsPath=/home/project/phg/filesystem/cmsPath

Loading…
Cancel
Save