修改区域公司

dev-discount
袁野 2 years ago
parent f137c6be9a
commit 9b531f4304
  1. 26
      hai-cweb/src/main/java/com/cweb/controller/BsMsgController.java
  2. 5
      hai-cweb/src/main/java/com/cweb/controller/HighThirdPartyController.java
  3. 14
      hai-service/src/main/java/com/hai/config/ThirdProductConfig.java
  4. 2
      hai-service/src/main/java/com/hai/dao/BsMsgUserMapperExt.java
  5. 4
      hai-service/src/main/java/com/hai/order/model/CreateOrderChildModel.java
  6. 3
      hai-service/src/main/java/com/hai/order/service/OrderCreateHandleService.java
  7. 1
      hai-service/src/main/java/com/hai/order/service/impl/OrderServiceImpl.java
  8. 3
      hai-service/src/main/java/com/hai/service/impl/ApiProductServiceImpl.java
  9. 3
      hai-service/src/main/java/com/hai/service/impl/BsMsgServiceImpl.java
  10. 2
      hai-service/src/main/java/com/hai/service/impl/HighOrderServiceImpl.java

@ -102,21 +102,39 @@ public class BsMsgController {
@RequestMapping(value = "/queryMsgByList", method = RequestMethod.GET) @RequestMapping(value = "/queryMsgByList", method = RequestMethod.GET)
@ResponseBody @ResponseBody
@ApiOperation(value = "查询站内信列表") @ApiOperation(value = "查询站内信列表")
public ResponseData queryMsgByList(@RequestParam(value = "companyId", required = false) Long companyId, HttpServletRequest request) { public ResponseData queryMsgByList(
@RequestParam(value = "companyId", required = false) Long companyId,
@RequestParam(value = "type", required = false) Long type,
HttpServletRequest request) {
try { try {
// 用户 // 用户
SessionObject sessionObject = userCenter.getSessionObject(request); SessionObject sessionObject = userCenter.getSessionObject(request);
HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject(); HighUserModel userInfoModel = (HighUserModel) sessionObject.getObject();
Map<String, Object> mapUser = new HashMap<>();
mapUser.put("companyId" , companyId);
mapUser.put("type" , type);
mapUser.put("userId" , userInfoModel.getHighUser().getId());
mapUser.put("msgType" , 1);
// 查询个人站内信
List<BsMsg> userMsg = bsMsgService.queryMsgByList(mapUser);
// 查询全局站内信
Map<String, Object> map = new HashMap<>(); Map<String, Object> map = new HashMap<>();
map.put("companyId" , companyId); map.put("companyId" , companyId);
map.put("userId" , userInfoModel.getHighUser().getId()); map.put("type" , type);
map.put("msgType" , 2);
// 查询个人站内信
List<BsMsg> msgList = bsMsgService.queryMsgByList(map);
bsMsgService.queryMsgByList(map); msgList.addAll(userMsg);
return ResponseMsgUtil.success(bsMsgService.queryMsgByList(map)); return ResponseMsgUtil.success(msgList);
} catch (Exception e) { } catch (Exception e) {
log.error("HighOrderController -> addOrder() error!", e); log.error("HighOrderController -> addOrder() error!", e);

@ -302,6 +302,7 @@ public class HighThirdPartyController {
@ApiOperation(value = "查询第三方产品详情") @ApiOperation(value = "查询第三方产品详情")
public ResponseData getThirdPartyByDetail(@RequestParam(name = "platformId", required = true) Integer platformId, public ResponseData getThirdPartyByDetail(@RequestParam(name = "platformId", required = true) Integer platformId,
@RequestParam(name = "productType", required = true) Integer productType, @RequestParam(name = "productType", required = true) Integer productType,
@RequestParam(name = "productId", required = false) Long productId,
@RequestParam(name = "regionId", required = true) String regionId) { @RequestParam(name = "regionId", required = true) String regionId) {
try { try {
@ -314,7 +315,7 @@ public class HighThirdPartyController {
BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString()); BsCompany bsCompany = bsCompanyService.selectCompanyByRegion(region.getRegionId().toString());
return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , bsCompany.getId())); return ResponseMsgUtil.success(thirdProductConfig.getThirdPartyByDetail(platformId , productType , bsCompany.getId() , productId));
} catch (Exception e) { } catch (Exception e) {
log.error("HighUserCardController --> oilCardRefund() error!", e); log.error("HighUserCardController --> oilCardRefund() error!", e);
@ -407,7 +408,7 @@ public class HighThirdPartyController {
} }
} else if (order.getHighChildOrderList().get(0).getGoodsType() == 9) { } else if (order.getHighChildOrderList().get(0).getGoodsType() == 9) {
// 查询详单订单的实际 // 查询详单订单的实际
JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(1, 1, order.getCompanyId()); JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(1, 1, order.getCompanyId() , null);
object = QianZhuConfig.starbucksOrderByOrderNo(order.getOrderNo()); object = QianZhuConfig.starbucksOrderByOrderNo(order.getOrderNo());
if (object.getBoolean("success")) { if (object.getBoolean("success")) {

@ -1,6 +1,9 @@
package com.hai.config; package com.hai.config;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.hai.common.exception.ErrorCode;
import com.hai.common.exception.ErrorHelp;
import com.hai.common.exception.SysCode;
import com.hai.entity.BsProductConfig; import com.hai.entity.BsProductConfig;
import com.hai.entity.BsProductDiscount; import com.hai.entity.BsProductDiscount;
import com.hai.service.ApiProductService; import com.hai.service.ApiProductService;
@ -43,11 +46,12 @@ public class ThirdProductConfig {
} }
// 产品折扣比例 // 产品折扣比例
public BsProductConfig getProductConfig(Integer productType , Long companyId) { public BsProductConfig getProductConfig(Integer productType , Long companyId , Long productId) {
Map<String, Object> listMap = new HashMap<>(); Map<String, Object> listMap = new HashMap<>();
listMap.put("productType", productType); listMap.put("productType", productType);
listMap.put("companyId", companyId); listMap.put("companyId", companyId);
listMap.put("productId", productId);
List<BsProductConfig> productConfigs = apiProductService.getProductConfig(listMap); List<BsProductConfig> productConfigs = apiProductService.getProductConfig(listMap);
@ -57,8 +61,12 @@ public class ThirdProductConfig {
return null; return null;
} }
public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId) { public JSONObject getThirdPartyByDetail(Integer platformId , Integer productType , Long companyId , Long productId) {
BsProductConfig productConfig = getProductConfig(productType, companyId); BsProductConfig productConfig = getProductConfig(productType, companyId , productId);
if (productConfig == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "暂未配置当前内容");
}
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();

@ -21,6 +21,8 @@ public interface BsMsgUserMapperExt {
"where status = 2 " + "where status = 2 " +
"and company_id = #{param.companyId} " + "and company_id = #{param.companyId} " +
"<if test='param.userId != null'> and user_id = #{param.userId} </if>", "<if test='param.userId != null'> and user_id = #{param.userId} </if>",
"<if test='param.type != null'> and type = #{param.type} </if>",
"<if test='param.msgType != null'> and msg_type = #{param.msgType} </if>",
"<if test='param.whereCheck != null'> and where_check = #{param.whereCheck} </if>", "<if test='param.whereCheck != null'> and where_check = #{param.whereCheck} </if>",
"order by create_time desc; " + "order by create_time desc; " +
" </script>"}) " </script>"})

@ -68,6 +68,10 @@ public class CreateOrderChildModel {
// 代理商价格 // 代理商价格
private Boolean isTyAgent; private Boolean isTyAgent;
/** ======================= 油站所需参数 ======================== **/ /** ======================= 油站所需参数 ======================== **/
/** ======================= 肯德基,星巴克,会员充值所需参数 ======================== **/
// 下单电话
private String customerMobile;
/** ======================= 肯德基,星巴克,会员充值所需参数 ======================== **/
} }

@ -55,4 +55,7 @@ public interface OrderCreateHandleService {
*/ */
ResponseData hltUnionCardRecharge(CreateOrderChildModel createOrderChild); ResponseData hltUnionCardRecharge(CreateOrderChildModel createOrderChild);
// List<HighChildOrder> thirdProduct()
} }

@ -183,6 +183,7 @@ public class OrderServiceImpl implements OrderService {
// 肯德基 // 肯德基
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) { } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE4.getNumber())) {
order.setProductType(OrderProductType.PRODUCT_TYPE2.getNumber()); order.setProductType(OrderProductType.PRODUCT_TYPE2.getNumber());
// 创建肯德基订单业务
// 电影票 // 电影票
} else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE5.getNumber())) { } else if (child.getGoodsType().equals(OrderChildGoodsType.TYPE5.getNumber())) {

@ -340,6 +340,9 @@ public class ApiProductServiceImpl implements ApiProductService {
if (MapUtils.getString(map, "productName") != null) { if (MapUtils.getString(map, "productName") != null) {
criteria.andProductNameEqualTo(MapUtils.getString(map, "productName")); criteria.andProductNameEqualTo(MapUtils.getString(map, "productName"));
} }
if (MapUtils.getLong(map, "productId") != null) {
criteria.andProductIdEqualTo(MapUtils.getLong(map, "productId"));
}
return productConfigMapper.selectByExample(example); return productConfigMapper.selectByExample(example);
} }

@ -11,6 +11,7 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import java.beans.Transient; import java.beans.Transient;
import java.util.Date; import java.util.Date;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import java.util.jar.JarEntry; import java.util.jar.JarEntry;
@ -94,7 +95,7 @@ public class BsMsgServiceImpl implements BsMsgService {
// 查询用户相关站内信内容 // 查询用户相关站内信内容
List<BsMsgUser> list = findMsgUserById(user.getId() , msgId); List<BsMsgUser> list = findMsgUserById(user.getId() , msgId);
BsMsgUser bsMsgUser = new BsMsgUser(); BsMsgUser bsMsgUser = new BsMsgUser();
// 判读是否有呢日 // 判读是否有数据
if (list.size()>0) { if (list.size()>0) {
bsMsgUser = list.get(0); bsMsgUser = list.get(0);
// 判断当前内容是否已经查看过了 // 判断当前内容是否已经查看过了

@ -2464,7 +2464,7 @@ public class HighOrderServiceImpl implements HighOrderService {
BigDecimal marketPrice = new BigDecimal(0); BigDecimal marketPrice = new BigDecimal(0);
// 查询详单订单的实际 // 查询详单订单的实际
JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId")); JSONObject productDetail = thirdProductConfig.getThirdPartyByDetail(object.getInteger("platformId"), object.getInteger("productType"), object.getLong("companyId") , object.getLong("productId"));
highOrder.setProductType(object.getInteger("productType")); highOrder.setProductType(object.getInteger("productType"));

Loading…
Cancel
Save