Merge remote-tracking branch 'origin/dev' into yy_dev

# Conflicts:
#	cweb/src/main/java/com/cweb/controller/TestController.java
#	service/src/main/java/com/hfkj/unipush/UniPushService.java
master
袁野 12 months ago
parent 16b6a8fb5f
commit 0f8aed4959
  1. 38
      cweb/src/main/java/com/cweb/controller/group/OpenGroupController.java
  2. 2
      service/src/main/java/com/hfkj/model/BsStoreExtMsgModel.java

@ -7,6 +7,7 @@ import com.hfkj.common.exception.ErrorHelp;
import com.hfkj.common.exception.SysCode;
import com.hfkj.common.utils.CoordCommonUtil;
import com.hfkj.common.utils.ResponseMsgUtil;
import com.hfkj.entity.BsMer;
import com.hfkj.entity.BsStore;
import com.hfkj.entity.BsStoreGroupContent;
import com.hfkj.entity.BsStoreGroupDetail;
@ -15,6 +16,7 @@ import com.hfkj.group.BsStoreGroupService;
import com.hfkj.model.GroupContentModel;
import com.hfkj.model.OpenStoreModel;
import com.hfkj.model.ResponseData;
import com.hfkj.service.BsMerService;
import com.hfkj.service.BsStoreService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
@ -49,6 +51,9 @@ public class OpenGroupController {
@Resource
private BsStoreGroupProductService storeGroupProductService;
@Resource
private BsMerService merService;
@RequestMapping(value="/getStoreList",method = RequestMethod.POST)
@ResponseBody
@ApiOperation(value = "商户查询门店列表")
@ -140,6 +145,9 @@ public class OpenGroupController {
bsStore.setBsStoreExtMsg(storeGroupService.findStoreExtMsgByStoreId(storeId));
bsStore.setBsStoreImg(storeGroupService.getBsStoreImgByList(map));
BsMer bsMer = merService.getMerDetail(bsStore.getMerId());
bsStore.setMerchantNo(bsMer.getMerNo());
return ResponseMsgUtil.success(bsStore);
} catch (Exception e) {
@ -165,4 +173,34 @@ public class OpenGroupController {
}
}
@RequestMapping(value="/getMerNo",method = RequestMethod.GET)
@ResponseBody
@ApiOperation(value = "获取订单号")
public ResponseData getMerNo(@RequestParam(value = "storeId" , required = true) Long storeId) {
try {
Map<String , Object > map = new HashMap<>();
map.put("storeId" , storeId);
BsStore bsStore = bsStoreService.getStoreById(storeId);
if (bsStore == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到门店信息!");
}
BsMer bsMer = merService.getMerDetail(bsStore.getMerId());
if (bsMer == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "未查询到商户信息!");
}
return ResponseMsgUtil.success(bsMer.getMerNo());
} catch (Exception e) {
log.error(e.getMessage(), e);
return ResponseMsgUtil.exception(e);
}
}
}

@ -16,4 +16,6 @@ public class BsStoreExtMsgModel {
private BsStoreExtMsg bsStoreExtMsg;
private String merchantNo;
}

Loading…
Cancel
Save