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 e9d7af7b3c
commit 68bb6dacc5
  1. 2
      cweb/src/main/java/com/cweb/controller/group/BsStoreGroupController.java
  2. 7
      cweb/src/main/java/com/cweb/controller/group/BsStoreImgController.java
  3. 10
      cweb/src/main/java/com/cweb/controller/group/OpenGroupController.java
  4. 12
      service/src/main/java/com/hfkj/group/impl/BsStoreGroupProductServiceImpl.java
  5. 3
      service/src/main/java/com/hfkj/model/OpenStoreModel.java

@ -168,7 +168,7 @@ public class BsStoreGroupController {
storeGroupDetail.setName(object.getString("name"));
storeGroupDetail.setProductImg(storeProduct.getImg());
storeGroupDetail.setProductName(storeProduct.getName());
storeGroupDetail.setProductSpec(storeProduct.getSpec());
storeGroupDetail.setProductSpec(data.getInteger("count") + storeProduct.getSpec());
storeGroupDetail.setStoreProductId(data.getString("productId"));
storeGroupDetail.setCreateTime(new Date());
storeGroupDetail.setStatus(1);

@ -11,6 +11,7 @@ import com.hfkj.model.ResponseData;
import com.hfkj.model.UserInfoModel;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.collections4.MapUtils;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@ -104,14 +105,16 @@ public class BsStoreImgController {
if (userInfoModel == null || userInfoModel.getSalesman() == null) {
throw ErrorHelp.genException(SysCode.System, ErrorCode.COMMON_ERROR, "该角色暂无权限");
}
String[] imgList = storeImg.getImg().split(",");
for (String i : imgList) {
storeImg.setStatus(1);
storeImg.setCreateTime(new Date());
storeImg.setUpdateTime(new Date());
storeImg.setOpId(userInfoModel.getSalesman().getId());
storeImg.setOpName(userInfoModel.getSalesman().getName());
storeImg.setImg(i);
storeGroupService.insertStoreImg(storeImg);
}
return ResponseMsgUtil.success("操作成功");

@ -7,10 +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;
import com.hfkj.entity.*;
import com.hfkj.group.BsStoreGroupProductService;
import com.hfkj.group.BsStoreGroupService;
import com.hfkj.model.GroupContentModel;
@ -68,6 +65,7 @@ public class OpenGroupController {
for (OpenStoreModel storeModel : list) {
Map<String , Object > map = new HashMap<>();
map.put("storeId" , storeModel.getStoreId());
map.put("status" , 1);
List<BsStoreGroupContent> storeGroupContent = storeGroupProductService.getStoreGroupContentByList(map);
if (longitude != null && latitude != null && storeModel.getLatitude() != null && storeModel.getLongitude() != null) {
double distance = CoordCommonUtil.getDistance(Double.valueOf(storeModel.getLatitude()), Double.valueOf(storeModel.getLongitude()), Double.valueOf(latitude), Double.valueOf(longitude));
@ -81,6 +79,7 @@ public class OpenGroupController {
}
storeModel.setStoreGroupContentList(storeGroupContent);
storeModel.setBsStoreExtMsg(storeGroupService.findStoreExtMsgByStoreId(Long.valueOf(storeModel.getStoreId())));
}
list = list.stream().filter(data -> !data.getStoreGroupContentList().isEmpty()).sorted(Comparator.comparing(OpenStoreModel::getDistance)).collect(Collectors.toList());
@ -106,7 +105,7 @@ public class OpenGroupController {
List<BsStoreGroupDetail> list = storeGroupProductService.getGroupDetailByList(map);
Map<String, List<BsStoreGroupDetail>> collect = list.stream().collect(Collectors.groupingBy(BsStoreGroupDetail::getName));
Map<String, List<BsStoreGroupDetail>> collect = list.stream().sorted(Comparator.comparing(BsStoreGroupDetail::getCreateTime)).collect(Collectors.groupingBy(BsStoreGroupDetail::getName));
List<JSONObject> groupDetails = collect.keySet().stream().map(key -> {
JSONObject detailObject = new JSONObject(true);
@ -134,6 +133,7 @@ public class OpenGroupController {
Map<String , Object > map = new HashMap<>();
map.put("storeId" , storeId);
map.put("status" , 1);
BsStore bsStore = bsStoreService.getStoreById(storeId);

@ -47,7 +47,12 @@ public class BsStoreGroupProductServiceImpl implements BsStoreGroupProductServic
if (org.apache.commons.collections4.MapUtils.getLong(map, "storeId") != null) {
criteria.andStoreIdEqualTo(MapUtils.getLong(map, "storeId"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andStatusNotEqualTo(0);
}
return storeGroupContentMapper.selectByExample(example);
}
@ -96,8 +101,13 @@ public class BsStoreGroupProductServiceImpl implements BsStoreGroupProductServic
if (MapUtils.getLong(map, "groupId") != null) {
criteria.andGroupIdEqualTo(MapUtils.getLong(map, "groupId"));
}
if (MapUtils.getInteger(map, "status") != null) {
criteria.andStatusEqualTo(MapUtils.getInteger(map, "status"));
} else {
criteria.andStatusNotEqualTo(0);
}
return storeGroupDetailMapper.selectByExample(example);
}

@ -1,6 +1,7 @@
package com.hfkj.model;
import ch.qos.logback.core.db.dialect.DBUtil;
import com.hfkj.entity.BsStoreExtMsg;
import com.hfkj.entity.BsStoreGroupContent;
import javax.xml.crypto.Data;
@ -56,4 +57,6 @@ public class OpenStoreModel {
private List<BsStoreGroupContent> storeGroupContentList;
private BsStoreExtMsg bsStoreExtMsg;
}

Loading…
Cancel
Save