区域/档口管理
This commit is contained in:
parent
eac739145d
commit
e70bd4511d
|
|
@ -1,75 +0,0 @@
|
||||||
package com.bonus.common.houqin.utils;
|
|
||||||
|
|
||||||
import io.swagger.annotations.ApiModelProperty;
|
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
|
|
||||||
public class LeRequest<T> {
|
|
||||||
@ApiModelProperty("版本控制")
|
|
||||||
private String version;
|
|
||||||
@ApiModelProperty("随机字符串")
|
|
||||||
private String nonceStr;
|
|
||||||
@ApiModelProperty("时间戳")
|
|
||||||
private String timestamp;
|
|
||||||
@ApiModelProperty("签名类型")
|
|
||||||
private String signType;
|
|
||||||
@ApiModelProperty("业务参数")
|
|
||||||
private @Valid T content;
|
|
||||||
@ApiModelProperty("签名")
|
|
||||||
private String sign;
|
|
||||||
|
|
||||||
public String getVersion() {
|
|
||||||
return this.version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getNonceStr() {
|
|
||||||
return this.nonceStr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getTimestamp() {
|
|
||||||
return this.timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSignType() {
|
|
||||||
return this.signType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public T getContent() {
|
|
||||||
return this.content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public String getSign() {
|
|
||||||
return this.sign;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setVersion(final String version) {
|
|
||||||
this.version = version;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setNonceStr(final String nonceStr) {
|
|
||||||
this.nonceStr = nonceStr;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTimestamp(final String timestamp) {
|
|
||||||
this.timestamp = timestamp;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSignType(final String signType) {
|
|
||||||
this.signType = signType;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setContent(final T content) {
|
|
||||||
this.content = content;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSign(final String sign) {
|
|
||||||
this.sign = sign;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
@ -9,6 +9,7 @@ import com.bonus.canteen.core.allocation.alloc.model.MerchantLoginApp;
|
||||||
import com.bonus.canteen.core.allocation.alloc.service.AllocMetadataService;
|
import com.bonus.canteen.core.allocation.alloc.service.AllocMetadataService;
|
||||||
import com.bonus.canteen.core.allocation.alloc.service.MerchantLoginAppService;
|
import com.bonus.canteen.core.allocation.alloc.service.MerchantLoginAppService;
|
||||||
import com.bonus.canteen.core.allocation.canteen.dto.AllocCanteenPayDTO;
|
import com.bonus.canteen.core.allocation.canteen.dto.AllocCanteenPayDTO;
|
||||||
|
import com.bonus.canteen.core.common.enums.AllocMobilePayConfEnum;
|
||||||
import com.bonus.canteen.core.common.enums.MetadataModelTypeEnum;
|
import com.bonus.canteen.core.common.enums.MetadataModelTypeEnum;
|
||||||
import com.bonus.canteen.core.common.redis.RedisUtil;
|
import com.bonus.canteen.core.common.redis.RedisUtil;
|
||||||
import com.bonus.canteen.core.common.utils.TenantContextHolder;
|
import com.bonus.canteen.core.common.utils.TenantContextHolder;
|
||||||
|
|
@ -129,4 +130,20 @@ public class AllocPayMetadataApi {
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AllocCanteenPayDTO getAllocCanteenPayDTO(Long canteenId) {
|
||||||
|
Map<String, String> payMap = this.globalMetadataApi.getMap(MetadataModelTypeEnum.PAY, canteenId, (Long)null);
|
||||||
|
if (!payMap.containsKey("alipayMobilePayConf")) {
|
||||||
|
payMap.put("alipayMobilePayConf", AllocMobilePayConfEnum.ALLOW_RECHARGE_CONSUME.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
if (!payMap.containsKey("wechatMobilePayConf")) {
|
||||||
|
payMap.put("wechatMobilePayConf", AllocMobilePayConfEnum.ALLOW_RECHARGE_CONSUME.getKey());
|
||||||
|
}
|
||||||
|
|
||||||
|
// AbcMerchantQueryVO abcVO = this.abcPayApi.queryAbcMerchantInfo(canteenId);
|
||||||
|
// Map<String, String> abcMap = MetadataUtil.transferAbcPayToMap(abcVO);
|
||||||
|
// payMap.putAll(abcMap); 2025-03-04 dgw 注释 农行
|
||||||
|
return new AllocCanteenPayDTO((String)payMap.get("ifEnablePay"), (String)payMap.get("payTypes"), payMap);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -18,10 +18,7 @@ import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Component;
|
import org.springframework.stereotype.Component;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import java.util.Iterator;
|
import java.util.*;
|
||||||
import java.util.List;
|
|
||||||
import java.util.Map;
|
|
||||||
import java.util.Objects;
|
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
@Component
|
@Component
|
||||||
|
|
@ -159,4 +156,23 @@ public class GlobalMetadataApi {
|
||||||
public void delete(Long canteenId, Long stallId) {
|
public void delete(Long canteenId, Long stallId) {
|
||||||
this.allocMetadataService.deletePayMetadataRelation(canteenId, stallId);
|
this.allocMetadataService.deletePayMetadataRelation(canteenId, stallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public Map<String, String> getMap(MetadataModelTypeEnum modelTypeEnum, Long canteenId, Long stallId) {
|
||||||
|
List<AllocMetadata> metadataList = this.getList(modelTypeEnum, canteenId, stallId);
|
||||||
|
return this.payMetadataListToMap(metadataList);
|
||||||
|
}
|
||||||
|
|
||||||
|
private Map<String, String> payMetadataListToMap(List<AllocMetadata> metadataList) {
|
||||||
|
if (CollUtil.isEmpty(metadataList)) {
|
||||||
|
return new HashMap();
|
||||||
|
} else {
|
||||||
|
Map<String, String> resultMap = new HashMap();
|
||||||
|
metadataList.forEach((metadata) -> {
|
||||||
|
String metadataValue = MetadataUtil.metadataPathFieldHandler(metadata.getModelKey(), metadata.getModelValue(),
|
||||||
|
true);
|
||||||
|
resultMap.put(metadata.getModelKey(), metadataValue);
|
||||||
|
});
|
||||||
|
return resultMap;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -10,9 +10,9 @@ import com.bonus.canteen.core.allocation.canteen.model.AllocStallModifyModel;
|
||||||
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenNumParam;
|
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenNumParam;
|
||||||
|
|
||||||
public interface AllocCanteenBusiness {
|
public interface AllocCanteenBusiness {
|
||||||
// String getCanteenNum(AllocCanteenNumParam param);
|
String getCanteenNum(AllocCanteenNumParam param);
|
||||||
//
|
|
||||||
// AllocCanteenModifyModel getCanteenForModify(Long canteenId);
|
AllocCanteenModifyModel getCanteenForModify(Long canteenId);
|
||||||
|
|
||||||
AllocStallModifyModel getStallForModify(Long stallId);
|
AllocStallModifyModel getStallForModify(Long stallId);
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -91,9 +91,9 @@ public class AllocCanteenBusinessImpl implements AllocCanteenBusiness {
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private AllocStallService allocStallService;
|
private AllocStallService allocStallService;
|
||||||
// @Autowired
|
@Autowired
|
||||||
// @Lazy
|
@Lazy
|
||||||
// private AllocMealLineService allocMealLineService;
|
private AllocMealLineService allocMealLineService;
|
||||||
@Autowired
|
@Autowired
|
||||||
@Lazy
|
@Lazy
|
||||||
private AllocLabelService allocLabelService;
|
private AllocLabelService allocLabelService;
|
||||||
|
|
@ -126,55 +126,56 @@ public class AllocCanteenBusinessImpl implements AllocCanteenBusiness {
|
||||||
@Resource
|
@Resource
|
||||||
private AesEncryptUtil aesEncryptUtil;
|
private AesEncryptUtil aesEncryptUtil;
|
||||||
|
|
||||||
// public String getCanteenNum(AllocCanteenNumParam param) {
|
public String getCanteenNum(AllocCanteenNumParam param) {
|
||||||
// Long superId = param.getSuperId();
|
Long superId = param.getSuperId();
|
||||||
// AllocCanteenTreeTypeEnum canteenTreeTypeEnum = AllocCanteenTreeTypeEnum.getTypeEnum(param.getCanteenTreeType());
|
AllocCanteenTreeTypeEnum canteenTreeTypeEnum = AllocCanteenTreeTypeEnum.getTypeEnum(param.getCanteenTreeType());
|
||||||
// switch (canteenTreeTypeEnum) {
|
switch (canteenTreeTypeEnum) {
|
||||||
// case MERCHANT:
|
case MERCHANT:
|
||||||
// return this.allocAreaService.getLatestFirstAreaNum();
|
return this.allocAreaService.getLatestFirstAreaNum();
|
||||||
// case AREA:
|
case AREA:
|
||||||
// return this.allocAreaService.getLatestAreaNum(superId);
|
return this.allocAreaService.getLatestAreaNum(superId);
|
||||||
// case CANTEEN:
|
case CANTEEN:
|
||||||
// return this.allocCanteenService.getLatestCanteenNum(superId);
|
return this.allocCanteenService.getLatestCanteenNum(superId);
|
||||||
// case STALL:
|
case STALL:
|
||||||
// return this.allocStallService.getLatestStallNum(superId);
|
return this.allocStallService.getLatestStallNum(superId);
|
||||||
// case MEAL_LINE:
|
case MEAL_LINE:
|
||||||
// return this.allocMealLineService.getLatestStallNum(superId);
|
return this.allocMealLineService.getLatestStallNum(superId);
|
||||||
// default:
|
default:
|
||||||
// return "";
|
return "";
|
||||||
// }
|
}
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public AllocCanteenModifyModel getCanteenForModify(Long canteenId) {
|
public AllocCanteenModifyModel getCanteenForModify(Long canteenId) {
|
||||||
// AllocCanteen allocCanteen = (AllocCanteen)this.allocCanteenService.getOne((Wrapper)Wrappers.lambdaQuery(AllocCanteen.class).eq(AllocCanteen::getCanteenId, canteenId));
|
AllocCanteen allocCanteen = this.allocCanteenService.getOne(Wrappers.lambdaQuery(AllocCanteen.class)
|
||||||
// allocCanteen.setContactTel(this.aesEncryptUtil.aesEncrypt(allocCanteen.getContactTel()));
|
.eq(AllocCanteen::getCanteenId, canteenId));
|
||||||
// AllocCanteenSaveDTO canteenSaveDTO = new AllocCanteenSaveDTO();
|
allocCanteen.setContactTel(this.aesEncryptUtil.aesEncrypt(allocCanteen.getContactTel()));
|
||||||
// BeanUtils.copyProperties(allocCanteen, canteenSaveDTO);
|
AllocCanteenSaveDTO canteenSaveDTO = new AllocCanteenSaveDTO();
|
||||||
// if (ObjectUtil.isNotNull(canteenSaveDTO.getCustId())) {
|
BeanUtils.copyProperties(allocCanteen, canteenSaveDTO);
|
||||||
// CustInfo custInfo = this.custInfoApi.getCustInfoByCustId(canteenSaveDTO.getCustId());
|
if (ObjectUtil.isNotNull(canteenSaveDTO.getCustId())) {
|
||||||
// if (ObjectUtil.isNotNull(custInfo)) {
|
CustInfo custInfo = this.custInfoApi.getCustInfoByCustId(canteenSaveDTO.getCustId());
|
||||||
// canteenSaveDTO.setCustName(custInfo.getCustName());
|
if (ObjectUtil.isNotNull(custInfo)) {
|
||||||
// }
|
canteenSaveDTO.setCustName(custInfo.getCustName());
|
||||||
// }
|
}
|
||||||
//
|
}
|
||||||
// List<String> labelNameList = this.allocLabelMapper.listRelationLabelName(canteenId, (Long)null);
|
|
||||||
// canteenSaveDTO.setLabelNameList(labelNameList);
|
List<String> labelNameList = this.allocLabelMapper.listRelationLabelName(canteenId, (Long)null);
|
||||||
// AllocCanteenPayDTO payDTO = this.getAllocCanteenPayDTO(canteenId);
|
canteenSaveDTO.setLabelNameList(labelNameList);
|
||||||
// List<AllocMetadata> metadataList = this.globalMetadataApi.getList(MetadataModelTypeEnum.DELIVERY, canteenId, (Long)null);
|
AllocCanteenPayDTO payDTO = this.getAllocCanteenPayDTO(canteenId);
|
||||||
// AllocCanteenDeliveryModel deliveryModel = MetadataUtil.meteDataListToDelivery(metadataList);
|
List<AllocMetadata> metadataList = this.globalMetadataApi.getList(MetadataModelTypeEnum.DELIVERY, canteenId, (Long)null);
|
||||||
// AllocCanteenOrderDTO orderDTO = this.getAllocCanteenOrderDTO(canteenId, (Long)null);
|
AllocCanteenDeliveryModel deliveryModel = MetadataUtil.meteDataListToDelivery(metadataList);
|
||||||
// List<AllocMealtimeModel> mealtimeList = this.allocMealtimeApi.listMealtime(canteenId, (Long)null);
|
AllocCanteenOrderDTO orderDTO = this.getAllocCanteenOrderDTO(canteenId, (Long)null);
|
||||||
// if (CollUtil.isEmpty(mealtimeList)) {
|
List<AllocMealtimeModel> mealtimeList = this.allocMealtimeApi.listMealtime(canteenId, (Long)null);
|
||||||
// mealtimeList = this.allocMealtimeApi.listUseAvailableMealtime(canteenId, (Long)null, (Integer)null);
|
if (CollUtil.isEmpty(mealtimeList)) {
|
||||||
// }
|
mealtimeList = this.allocMealtimeApi.listUseAvailableMealtime(canteenId, (Long)null, (Integer)null);
|
||||||
//
|
}
|
||||||
// this.canteenCustomBusiness.canteenGroupQueryHandler(canteenId, canteenSaveDTO);
|
|
||||||
// return new AllocCanteenModifyModel(canteenId, canteenSaveDTO, payDTO, deliveryModel, orderDTO, mealtimeList);
|
this.canteenCustomBusiness.canteenGroupQueryHandler(canteenId, canteenSaveDTO);
|
||||||
// }
|
return new AllocCanteenModifyModel(canteenId, canteenSaveDTO, payDTO, deliveryModel, orderDTO, mealtimeList);
|
||||||
//
|
}
|
||||||
// private AllocCanteenPayDTO getAllocCanteenPayDTO(Long canteenId) {
|
|
||||||
// return this.allocPayMetadataApi.getAllocCanteenPayDTO(canteenId);
|
private AllocCanteenPayDTO getAllocCanteenPayDTO(Long canteenId) {
|
||||||
// }
|
return this.allocPayMetadataApi.getAllocCanteenPayDTO(canteenId);
|
||||||
|
}
|
||||||
|
|
||||||
private AllocCanteenOrderDTO getAllocCanteenOrderDTO(Long canteenId, Long stallId) {
|
private AllocCanteenOrderDTO getAllocCanteenOrderDTO(Long canteenId, Long stallId) {
|
||||||
return (AllocCanteenOrderDTO)this.globalMetadataApi.getModel(MetadataModelTypeEnum.ORDER_RESERVE, new AllocCanteenOrderDTO(), canteenId, stallId);
|
return (AllocCanteenOrderDTO)this.globalMetadataApi.getModel(MetadataModelTypeEnum.ORDER_RESERVE, new AllocCanteenOrderDTO(), canteenId, stallId);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.bonus.canteen.core.allocation.canteen.param.AllocAreaParam;
|
||||||
import com.bonus.canteen.core.allocation.canteen.service.AllocAreaService;
|
import com.bonus.canteen.core.allocation.canteen.service.AllocAreaService;
|
||||||
import com.bonus.canteen.core.allocation.canteen.vo.AllocAreaVO;
|
import com.bonus.canteen.core.allocation.canteen.vo.AllocAreaVO;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
@ -22,7 +21,9 @@ import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import javax.validation.constraints.NotNull;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping({"/api/v2/alloc/area"})
|
@RequestMapping({"/api/v2/alloc/area"})
|
||||||
|
|
@ -60,8 +61,9 @@ public class AllocAreaController {
|
||||||
@ApiOperation("根据区域id,查询区域名称")
|
@ApiOperation("根据区域id,查询区域名称")
|
||||||
@PostMapping({"/get-area-name"})
|
@PostMapping({"/get-area-name"})
|
||||||
// @RequiresGuest
|
// @RequiresGuest
|
||||||
public AjaxResult getAreaName(@RequestBody LeRequest<Long> request) {
|
public AjaxResult getAreaName(@RequestBody Map<String, Object> request) {
|
||||||
return AjaxResult.success(this.allocAreaService.getAreaName((Long)request.getContent()));
|
Long areaId = Long.valueOf((String) request.get("areaId"));
|
||||||
|
return AjaxResult.success(this.allocAreaService.getAreaName(areaId));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增区域")
|
@ApiOperation("新增区域")
|
||||||
|
|
@ -81,7 +83,8 @@ public class AllocAreaController {
|
||||||
@ApiOperation("删除区域")
|
@ApiOperation("删除区域")
|
||||||
@PostMapping({"/remove"})
|
@PostMapping({"/remove"})
|
||||||
// @RequiresGuest
|
// @RequiresGuest
|
||||||
public void removeArea(@RequestBody @Valid Long request) {
|
public void removeArea(@RequestBody Map<String, Object> request) {
|
||||||
this.allocCanteenBusiness.removeArea(request);
|
Long areaId = Long.valueOf((String) request.get("areaId"));
|
||||||
|
this.allocCanteenBusiness.removeArea(areaId);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -6,6 +6,7 @@ import com.bonus.canteen.core.allocation.canteen.dto.ModifyCanteenIfReserveDTO;
|
||||||
import com.bonus.canteen.core.allocation.canteen.dto.ModifyCanteenStateDTO;
|
import com.bonus.canteen.core.allocation.canteen.dto.ModifyCanteenStateDTO;
|
||||||
import com.bonus.canteen.core.allocation.canteen.dto.ModifyStallIfReserveDTO;
|
import com.bonus.canteen.core.allocation.canteen.dto.ModifyStallIfReserveDTO;
|
||||||
import com.bonus.canteen.core.allocation.canteen.model.*;
|
import com.bonus.canteen.core.allocation.canteen.model.*;
|
||||||
|
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenNumParam;
|
||||||
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallPageParam;
|
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallPageParam;
|
||||||
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenVO;
|
import com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenVO;
|
||||||
import com.bonus.canteen.core.allocation.canteen.vo.AllocStallVO;
|
import com.bonus.canteen.core.allocation.canteen.vo.AllocStallVO;
|
||||||
|
|
@ -26,6 +27,7 @@ import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping({"/api/v2/alloc/canteen"})
|
@RequestMapping({"/api/v2/alloc/canteen"})
|
||||||
|
|
@ -90,8 +92,9 @@ public class AllocCanteenController {
|
||||||
|
|
||||||
@ApiOperation("删除食堂")
|
@ApiOperation("删除食堂")
|
||||||
@PostMapping({"/remove-canteen"})
|
@PostMapping({"/remove-canteen"})
|
||||||
public void removeCanteen(@RequestBody @Valid Long request) {
|
public void removeCanteen(@RequestBody Map<String, Object> request) {
|
||||||
this.allocCanteenBusiness.removeCanteen(request);
|
Long canteenId = Long.valueOf((String) request.get("canteenId"));
|
||||||
|
this.allocCanteenBusiness.removeCanteen(canteenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("修改食堂 是否支持预订餐")
|
@ApiOperation("修改食堂 是否支持预订餐")
|
||||||
|
|
@ -108,8 +111,9 @@ public class AllocCanteenController {
|
||||||
|
|
||||||
@ApiOperation("校验食堂是否可以修改为休息状态")
|
@ApiOperation("校验食堂是否可以修改为休息状态")
|
||||||
@PostMapping({"/check-canteen-rest"})
|
@PostMapping({"/check-canteen-rest"})
|
||||||
public Integer checkCanteenRest(@RequestBody @Valid Long request) {
|
public Integer checkCanteenRest(@RequestBody Map<String, Object> request) {
|
||||||
return this.allocCanteenService.checkCanteenRest(request);
|
Long canteenId = Long.valueOf((String) request.get("canteenId"));
|
||||||
|
return this.allocCanteenService.checkCanteenRest(canteenId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("分页查询档口列表")
|
@ApiOperation("分页查询档口列表")
|
||||||
|
|
@ -120,8 +124,9 @@ public class AllocCanteenController {
|
||||||
|
|
||||||
@ApiOperation("查询单个档口(聚合查询)")
|
@ApiOperation("查询单个档口(聚合查询)")
|
||||||
@PostMapping({"/get-stall-for-modify"})
|
@PostMapping({"/get-stall-for-modify"})
|
||||||
public AllocStallModifyModel getStallForModify(@RequestBody Long request) {
|
public AllocStallModifyModel getStallForModify(@RequestBody Map<String, Object> request) {
|
||||||
return this.allocCanteenBusiness.getStallForModify(request);
|
Long stallId = Long.valueOf((String) request.get("stallId"));
|
||||||
|
return this.allocCanteenBusiness.getStallForModify(stallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("新增档口")
|
@ApiOperation("新增档口")
|
||||||
|
|
@ -138,8 +143,9 @@ public class AllocCanteenController {
|
||||||
|
|
||||||
@ApiOperation("删除档口")
|
@ApiOperation("删除档口")
|
||||||
@PostMapping({"/remove-stall"})
|
@PostMapping({"/remove-stall"})
|
||||||
public void removeStall(@RequestBody Long request) {
|
public void removeStall(@RequestBody Map<String, Object> request) {
|
||||||
this.allocCanteenBusiness.removeStall(request);
|
Long stallId = Long.valueOf((String) request.get("stallId"));
|
||||||
|
this.allocCanteenBusiness.removeStall(stallId);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ApiOperation("修改档口 是否支持预订餐")
|
@ApiOperation("修改档口 是否支持预订餐")
|
||||||
|
|
@ -148,4 +154,17 @@ public class AllocCanteenController {
|
||||||
this.allocStallService.modifyStallIfReserve(request);
|
this.allocStallService.modifyStallIfReserve(request);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询区域食堂档口餐线编号")
|
||||||
|
@PostMapping({"/get-canteen-num"})
|
||||||
|
public AjaxResult getCanteenNum(@RequestBody @Valid AllocCanteenNumParam request) {
|
||||||
|
return AjaxResult.success(this.allocCanteenBusiness.getCanteenNum(request));
|
||||||
|
}
|
||||||
|
|
||||||
|
@ApiOperation("查询单个食堂(聚合查询)")
|
||||||
|
@PostMapping({"/get-canteen-for-modify"})
|
||||||
|
public AllocCanteenModifyModel getCanteenForModify(@RequestBody Map<String, Object> request) {
|
||||||
|
Long canteenId = Long.valueOf((String) request.get("canteenId"));
|
||||||
|
return this.allocCanteenBusiness.getCanteenForModify(canteenId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -4,7 +4,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.bonus.canteen.core.allocation.canteen.param.AllocOtherPageParam;
|
import com.bonus.canteen.core.allocation.canteen.param.AllocOtherPageParam;
|
||||||
import com.bonus.canteen.core.allocation.canteen.service.AllocLabelService;
|
import com.bonus.canteen.core.allocation.canteen.service.AllocLabelService;
|
||||||
import com.bonus.canteen.core.allocation.canteen.vo.AllocLabelVO;
|
import com.bonus.canteen.core.allocation.canteen.vo.AllocLabelVO;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
@ -16,9 +15,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
@RequestMapping({"/api/v2/alloc/label"})
|
@RequestMapping({"/api/v2/alloc/label"})
|
||||||
@Api(
|
@Api(
|
||||||
|
|
|
||||||
|
|
@ -3,9 +3,7 @@ package com.bonus.canteen.core.allocation.canteen.controller;
|
||||||
import com.bonus.canteen.core.allocation.api.AllocMealtimeApi;
|
import com.bonus.canteen.core.allocation.api.AllocMealtimeApi;
|
||||||
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallParam;
|
import com.bonus.canteen.core.allocation.canteen.param.AllocCanteenStallParam;
|
||||||
import com.bonus.canteen.core.menu.model.AllocMealtimeModel;
|
import com.bonus.canteen.core.menu.model.AllocMealtimeModel;
|
||||||
import com.bonus.common.houqin.constant.LeConstants;
|
|
||||||
import com.bonus.common.houqin.framework.annotation.RequiresGuest;
|
import com.bonus.common.houqin.framework.annotation.RequiresGuest;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
@ -17,7 +15,6 @@ import org.springframework.web.bind.annotation.RequestBody;
|
||||||
import org.springframework.web.bind.annotation.RequestMapping;
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
import org.springframework.web.bind.annotation.RestController;
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
import javax.validation.Valid;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@RestController
|
@RestController
|
||||||
|
|
|
||||||
|
|
@ -105,6 +105,12 @@ public class AllocCanteenDeliveryModel {
|
||||||
this.deliveryList = deliveryList;
|
this.deliveryList = deliveryList;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public AllocCanteenDeliveryModel() {
|
||||||
|
this.minDeliveryFeeOnOff = AllocMinDeliveryFeeOnOffEnum.NONE.getKey();
|
||||||
|
this.mealtimeMinDeliveryFeeList = CollUtil.newArrayList(new MealtimeMinDeliveryFeeDTO[0]);
|
||||||
|
this.deliveryList = CollUtil.newArrayList(new AllocCanteenDeliveryDTO[0]);
|
||||||
|
}
|
||||||
|
|
||||||
public AllocCanteenDeliveryDTO deliveryDetailByType(Integer type) {
|
public AllocCanteenDeliveryDTO deliveryDetailByType(Integer type) {
|
||||||
return CollUtil.isEmpty(this.deliveryList) ? new AllocCanteenDeliveryDTO() : this.deliveryList.stream().filter((s) -> {
|
return CollUtil.isEmpty(this.deliveryList) ? new AllocCanteenDeliveryDTO() : this.deliveryList.stream().filter((s) -> {
|
||||||
return s.getDeliveryType().equals(type);
|
return s.getDeliveryType().equals(type);
|
||||||
|
|
|
||||||
|
|
@ -20,15 +20,15 @@ public interface AllocAreaMapper extends BaseMapper<AllocArea> {
|
||||||
permissionType = DataPermissionTypeEnum.PERMISSION_AREA
|
permissionType = DataPermissionTypeEnum.PERMISSION_AREA
|
||||||
)
|
)
|
||||||
Page<AllocArea> pageArea(@Param("page") Page<AllocArea> page, @Param("param") AllocAreaParam param);
|
Page<AllocArea> pageArea(@Param("page") Page<AllocArea> page, @Param("param") AllocAreaParam param);
|
||||||
//
|
|
||||||
// @Select({"SELECT MAX(area_num) FROM alloc_area WHERE if_del = 2 AND first_area_name IS NOT NULL AND second_area_name IS NULL"})
|
@Select({"SELECT MAX(area_num) FROM alloc_area WHERE if_del = 2 AND first_area_name IS NOT NULL AND second_area_name IS NULL"})
|
||||||
// String getLatestFirstAreaNum();
|
String getLatestFirstAreaNum();
|
||||||
|
|
||||||
@Select({"SELECT area_num FROM alloc_area WHERE area_id = #{areaId}"})
|
@Select({"SELECT area_num FROM alloc_area WHERE area_id = #{areaId}"})
|
||||||
String getAreaNumById(Long areaId);
|
String getAreaNumById(Long areaId);
|
||||||
//
|
|
||||||
// @Select({"SELECT MAX(area_num) FROM alloc_area WHERE if_del = 2 AND super_id = #{superId}"})
|
@Select({"SELECT MAX(area_num) FROM alloc_area WHERE if_del = 2 AND super_id = #{superId}"})
|
||||||
// String getLatestAreaNum(Long superId);
|
String getLatestAreaNum(Long superId);
|
||||||
//
|
//
|
||||||
// @Select({"SELECT area_id, area_name FROM alloc_area WHERE if_del = 2 AND area_name = #{areaName}"})
|
// @Select({"SELECT area_id, area_name FROM alloc_area WHERE if_del = 2 AND area_name = #{areaName}"})
|
||||||
// AllocArea getAreaIdByName(String areaName);
|
// AllocArea getAreaIdByName(String areaName);
|
||||||
|
|
|
||||||
|
|
@ -46,4 +46,7 @@ public interface AllocStallMapper extends BaseMapper<AllocStall> {
|
||||||
Long getCanteenId(@Param("stallId") Long stallId);
|
Long getCanteenId(@Param("stallId") Long stallId);
|
||||||
|
|
||||||
void updateByStallId(@Param("dto") AllocStallModifyDTO modifyDTO, @Param("stallId") Long stallId);
|
void updateByStallId(@Param("dto") AllocStallModifyDTO modifyDTO, @Param("stallId") Long stallId);
|
||||||
|
|
||||||
|
@Select({"SELECT stall_num FROM alloc_stall WHERE stall_id = #{stallId}"})
|
||||||
|
String getStallNumById(Long stallId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -14,10 +14,10 @@ import java.util.List;
|
||||||
|
|
||||||
public interface AllocAreaService extends IService<AllocArea> {
|
public interface AllocAreaService extends IService<AllocArea> {
|
||||||
Page<AllocAreaVO> pageArea(AllocAreaParam param);
|
Page<AllocAreaVO> pageArea(AllocAreaParam param);
|
||||||
//
|
|
||||||
// String getLatestFirstAreaNum();
|
String getLatestFirstAreaNum();
|
||||||
//
|
|
||||||
// String getLatestAreaNum(Long superId);
|
String getLatestAreaNum(Long superId);
|
||||||
|
|
||||||
String getAreaName(Long areaId);
|
String getAreaName(Long areaId);
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -42,4 +42,6 @@ public interface AllocCanteenService extends IService<AllocCanteen> {
|
||||||
Integer checkCanteenRest(Long canteenId);
|
Integer checkCanteenRest(Long canteenId);
|
||||||
|
|
||||||
AllocCanteen checkCanteenIdExist(Long canteenId);
|
AllocCanteen checkCanteenIdExist(Long canteenId);
|
||||||
|
|
||||||
|
String getLatestCanteenNum(Long superId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -7,7 +7,7 @@ import com.bonus.canteen.core.allocation.canteen.model.AllocMealLine;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
public interface AllocMealLineService extends IService<AllocMealLine> {
|
public interface AllocMealLineService extends IService<AllocMealLine> {
|
||||||
// String getLatestStallNum(Long superId);
|
String getLatestStallNum(Long superId);
|
||||||
//
|
//
|
||||||
// List<AllocMealLineVO> listMultipleMealLine(AllocCanteenStallParam param);
|
// List<AllocMealLineVO> listMultipleMealLine(AllocCanteenStallParam param);
|
||||||
//
|
//
|
||||||
|
|
|
||||||
|
|
@ -36,4 +36,6 @@ public interface AllocStallService extends IService<AllocStall> {
|
||||||
void deleteStall(Long stallId);
|
void deleteStall(Long stallId);
|
||||||
|
|
||||||
void modifyStallIfReserve(ModifyStallIfReserveDTO reserveDTO);
|
void modifyStallIfReserve(ModifyStallIfReserveDTO reserveDTO);
|
||||||
|
|
||||||
|
String getLatestStallNum(Long superId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -28,6 +28,7 @@ import com.bonus.canteen.core.common.utils.TenantContextHolder;
|
||||||
import com.bonus.canteen.core.common.utils.TreeNodeUtil;
|
import com.bonus.canteen.core.common.utils.TreeNodeUtil;
|
||||||
import com.bonus.canteen.core.common.utils.BaseTreeNode;
|
import com.bonus.canteen.core.common.utils.BaseTreeNode;
|
||||||
import com.bonus.canteen.core.order.mq.MqUtil;
|
import com.bonus.canteen.core.order.mq.MqUtil;
|
||||||
|
import com.bonus.canteen.core.order.utils.LeNumUtil;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.houqin.constant.LeConstants;
|
import com.bonus.common.houqin.constant.LeConstants;
|
||||||
import com.bonus.common.houqin.i18n.I18n;
|
import com.bonus.common.houqin.i18n.I18n;
|
||||||
|
|
@ -96,17 +97,17 @@ public class AllocAreaServiceImpl extends ServiceImpl<AllocAreaMapper, AllocArea
|
||||||
return resultPage;
|
return resultPage;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
//
|
|
||||||
// public String getLatestFirstAreaNum() {
|
public String getLatestFirstAreaNum() {
|
||||||
// String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestFirstAreaNum();
|
String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestFirstAreaNum();
|
||||||
// return LeNumUtil.getCanteenNum("", areaNum, false);
|
return LeNumUtil.getCanteenNum("", areaNum, false);
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// public String getLatestAreaNum(Long superId) {
|
public String getLatestAreaNum(Long superId) {
|
||||||
// String superNum = ((AllocAreaMapper)this.baseMapper).getAreaNumById(superId);
|
String superNum = ((AllocAreaMapper)this.baseMapper).getAreaNumById(superId);
|
||||||
// String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestAreaNum(superId);
|
String areaNum = ((AllocAreaMapper)this.baseMapper).getLatestAreaNum(superId);
|
||||||
// return LeNumUtil.getCanteenNum(superNum, areaNum, false);
|
return LeNumUtil.getCanteenNum(superNum, areaNum, false);
|
||||||
// }
|
}
|
||||||
|
|
||||||
public String getAreaName(Long areaId) {
|
public String getAreaName(Long areaId) {
|
||||||
if (ObjectUtil.isNull(areaId)) {
|
if (ObjectUtil.isNull(areaId)) {
|
||||||
|
|
|
||||||
|
|
@ -276,4 +276,5 @@ public class AllocCanteenServiceImpl extends ServiceImpl<AllocCanteenMapper, All
|
||||||
return allocCanteen;
|
return allocCanteen;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -9,8 +9,10 @@ import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
import com.bonus.canteen.core.allocation.canteen.mapper.AllocMealLineMapper;
|
import com.bonus.canteen.core.allocation.canteen.mapper.AllocMealLineMapper;
|
||||||
|
import com.bonus.canteen.core.allocation.canteen.mapper.AllocStallMapper;
|
||||||
import com.bonus.canteen.core.allocation.canteen.model.AllocMealLine;
|
import com.bonus.canteen.core.allocation.canteen.model.AllocMealLine;
|
||||||
import com.bonus.canteen.core.allocation.canteen.service.AllocMealLineService;
|
import com.bonus.canteen.core.allocation.canteen.service.AllocMealLineService;
|
||||||
|
import com.bonus.canteen.core.order.utils.LeNumUtil;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.BeanUtils;
|
import org.springframework.beans.BeanUtils;
|
||||||
|
|
@ -18,6 +20,7 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
import java.lang.invoke.SerializedLambda;
|
import java.lang.invoke.SerializedLambda;
|
||||||
import java.util.Iterator;
|
import java.util.Iterator;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
@ -30,24 +33,24 @@ public class AllocMealLineServiceImpl extends ServiceImpl<AllocMealLineMapper, A
|
||||||
// private AllocAreaService allocAreaService;
|
// private AllocAreaService allocAreaService;
|
||||||
// @Resource
|
// @Resource
|
||||||
// private AesEncryptUtil aesEncryptUtil;
|
// private AesEncryptUtil aesEncryptUtil;
|
||||||
// @Resource
|
@Resource
|
||||||
// private AllocStallMapper allocStallMapper;
|
private AllocStallMapper allocStallMapper;
|
||||||
// @Autowired
|
// @Autowired
|
||||||
// @Lazy
|
// @Lazy
|
||||||
// private DeviceApi deviceApi;
|
// private DeviceApi deviceApi;
|
||||||
// private static final String CACHE_PREFIX = "yst:";
|
// private static final String CACHE_PREFIX = "yst:";
|
||||||
// private static final String CACHE_KEY = "alloc-mealline";
|
// private static final String CACHE_KEY = "alloc-mealline";
|
||||||
// private static final long CACHE_SECONDS = 3600L;
|
// private static final long CACHE_SECONDS = 3600L;
|
||||||
//
|
|
||||||
// public String getLatestStallNum(Long superId) {
|
public String getLatestStallNum(Long superId) {
|
||||||
// String superNum = this.allocStallMapper.getStallNumById(superId);
|
String superNum = this.allocStallMapper.getStallNumById(superId);
|
||||||
// if (StrUtil.isBlank(superNum)) {
|
if (StrUtil.isBlank(superNum)) {
|
||||||
// superNum = "01";
|
superNum = "01";
|
||||||
// }
|
}
|
||||||
//
|
|
||||||
// String stallNum = ((AllocMealLineMapper)this.baseMapper).getLatestMealLineNum(superId);
|
String stallNum = ((AllocMealLineMapper)this.baseMapper).getLatestMealLineNum(superId);
|
||||||
// return LeNumUtil.getCanteenNum(superNum, stallNum, true);
|
return LeNumUtil.getCanteenNum(superNum, stallNum, true);
|
||||||
// }
|
}
|
||||||
//
|
//
|
||||||
// public List<AllocMealLineVO> listMultipleMealLine(AllocCanteenStallParam param) {
|
// public List<AllocMealLineVO> listMultipleMealLine(AllocCanteenStallParam param) {
|
||||||
// return ((AllocMealLineMapper)this.baseMapper).listMultipleMealLine(param.getStallIdList());
|
// return ((AllocMealLineMapper)this.baseMapper).listMultipleMealLine(param.getStallIdList());
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,24 @@
|
||||||
|
package com.bonus.canteen.core.common.enums;
|
||||||
|
|
||||||
|
public enum AllocMobilePayConfEnum {
|
||||||
|
ONLY_RECHARGE("1", "仅充值"),
|
||||||
|
ONLY_CONSUME("2", "仅消费"),
|
||||||
|
ALLOW_RECHARGE_CONSUME("3", "允许充值消费");
|
||||||
|
|
||||||
|
private final String key;
|
||||||
|
private final String desc;
|
||||||
|
|
||||||
|
private AllocMobilePayConfEnum(String key, String desc) {
|
||||||
|
this.key = key;
|
||||||
|
this.desc = desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getKey() {
|
||||||
|
return this.key;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDesc() {
|
||||||
|
return this.desc;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
package com.bonus.canteen.core.common.sysfile.controller;
|
package com.bonus.canteen.core.common.sysfile.controller;
|
||||||
|
|
||||||
import com.bonus.common.core.web.controller.BaseController;
|
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.canteen.core.common.core.util.Base64DecodedMultipartFile;
|
import com.bonus.canteen.core.common.core.util.Base64DecodedMultipartFile;
|
||||||
import com.bonus.canteen.core.common.enums.FileNameSuffixEnum;
|
import com.bonus.canteen.core.common.enums.FileNameSuffixEnum;
|
||||||
|
|
@ -9,7 +8,6 @@ import com.bonus.canteen.core.common.sysfile.dto.SysFileUploadDTO;
|
||||||
import com.bonus.canteen.core.common.sysfile.service.SysFileService;
|
import com.bonus.canteen.core.common.sysfile.service.SysFileService;
|
||||||
import com.bonus.canteen.core.common.sysfile.vo.SysFileUploadVO;
|
import com.bonus.canteen.core.common.sysfile.vo.SysFileUploadVO;
|
||||||
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
|
|
@ -17,7 +15,6 @@ import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
import org.springframework.web.multipart.MultipartFile;
|
import org.springframework.web.multipart.MultipartFile;
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
|
||||||
import javax.validation.Valid;
|
import javax.validation.Valid;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ import com.bonus.common.core.web.page.TableDataInfo;
|
||||||
import com.bonus.common.houqin.constant.SourceTypeEnum;
|
import com.bonus.common.houqin.constant.SourceTypeEnum;
|
||||||
import com.bonus.canteen.core.customer.model.CustInfo;
|
import com.bonus.canteen.core.customer.model.CustInfo;
|
||||||
import com.bonus.canteen.core.customer.vo.CustInfoVo;
|
import com.bonus.canteen.core.customer.vo.CustInfoVo;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import com.bonus.canteen.core.customer.service.CustInfoService;
|
import com.bonus.canteen.core.customer.service.CustInfoService;
|
||||||
|
|
|
||||||
|
|
@ -1,25 +1,17 @@
|
||||||
package com.bonus.canteen.core.customer.controller;
|
package com.bonus.canteen.core.customer.controller;
|
||||||
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
import com.alibaba.fastjson.JSONObject;
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
|
||||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
||||||
import com.bonus.canteen.core.common.base.BaseController;
|
import com.bonus.canteen.core.common.base.BaseController;
|
||||||
import com.bonus.canteen.core.customer.model.CustJob;
|
import com.bonus.canteen.core.customer.model.CustJob;
|
||||||
import com.bonus.canteen.core.customer.service.CustJobService;
|
import com.bonus.canteen.core.customer.service.CustJobService;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.houqin.i18n.I18n;
|
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import com.bonus.common.security.annotation.RequiresPermissions;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
import java.util.Collections;
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.Map;
|
import java.util.Map;
|
||||||
|
|
||||||
|
|
@ -35,11 +27,8 @@ public class CustJobController extends BaseController {
|
||||||
// SyncCustJobAPI syncCustJobAPI;
|
// SyncCustJobAPI syncCustJobAPI;
|
||||||
|
|
||||||
@ApiOperation("全量查询")
|
@ApiOperation("全量查询")
|
||||||
@GetMapping({"/queryAllCustJob"})
|
@PostMapping({"/queryAllCustJob"})
|
||||||
public AjaxResult queryAllCustJob(LeRequest<String> request) {
|
public AjaxResult queryAllCustJob(@RequestBody CustJob record) {
|
||||||
String content = (String)request.getContent();
|
|
||||||
JSONObject jsonObject = JSONObject.parseObject(content);
|
|
||||||
CustJob record = (CustJob)jsonObject.getJSONObject("object").toJavaObject(CustJob.class);
|
|
||||||
List<CustJob> list = this.custJobService.list(Wrappers.query(record));
|
List<CustJob> list = this.custJobService.list(Wrappers.query(record));
|
||||||
return AjaxResult.success(list);
|
return AjaxResult.success(list);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -15,12 +15,10 @@ import com.bonus.canteen.core.secure.filter.annotation.RequiresAuthentication;
|
||||||
import com.bonus.common.core.web.domain.AjaxResult;
|
import com.bonus.common.core.web.domain.AjaxResult;
|
||||||
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
||||||
import com.bonus.common.houqin.utils.LeBeanUtil;
|
import com.bonus.common.houqin.utils.LeBeanUtil;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
import org.slf4j.Logger;
|
import org.slf4j.Logger;
|
||||||
import org.slf4j.LoggerFactory;
|
import org.slf4j.LoggerFactory;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
|
||||||
import org.springframework.context.annotation.Lazy;
|
import org.springframework.context.annotation.Lazy;
|
||||||
import org.springframework.web.bind.annotation.*;
|
import org.springframework.web.bind.annotation.*;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -2,8 +2,6 @@ package com.bonus.canteen.core.menu.service.impl;
|
||||||
|
|
||||||
import cn.hutool.core.bean.BeanUtil;
|
import cn.hutool.core.bean.BeanUtil;
|
||||||
import cn.hutool.core.collection.CollUtil;
|
import cn.hutool.core.collection.CollUtil;
|
||||||
import com.alibaba.fastjson.JSON;
|
|
||||||
import com.alibaba.fastjson.JSONObject;
|
|
||||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||||
|
|
@ -23,9 +21,9 @@ import com.bonus.canteen.core.menu.vo.MenuNutritionAllVO;
|
||||||
import com.bonus.canteen.core.menu.vo.MenuNutritionPageVO;
|
import com.bonus.canteen.core.menu.vo.MenuNutritionPageVO;
|
||||||
import com.bonus.canteen.core.menu.vo.NutritionTypeVO;
|
import com.bonus.canteen.core.menu.vo.NutritionTypeVO;
|
||||||
import com.bonus.common.core.exception.ServiceException;
|
import com.bonus.common.core.exception.ServiceException;
|
||||||
import com.bonus.common.core.utils.id.Id;
|
|
||||||
import com.bonus.common.houqin.constant.DelFlagEnum;
|
import com.bonus.common.houqin.constant.DelFlagEnum;
|
||||||
import com.bonus.common.houqin.utils.LeBeanUtil;
|
import com.bonus.common.houqin.utils.LeBeanUtil;
|
||||||
|
import com.bonus.common.houqin.utils.id.Id;
|
||||||
import com.bonus.common.security.utils.SecurityUtils;
|
import com.bonus.common.security.utils.SecurityUtils;
|
||||||
import org.apache.commons.lang3.ObjectUtils;
|
import org.apache.commons.lang3.ObjectUtils;
|
||||||
import org.apache.commons.lang3.StringUtils;
|
import org.apache.commons.lang3.StringUtils;
|
||||||
|
|
|
||||||
|
|
@ -134,7 +134,7 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
||||||
Long orgId = custInfo.getOrgId();
|
Long orgId = custInfo.getOrgId();
|
||||||
Integer psnType = custInfo.getPsnType();
|
Integer psnType = custInfo.getPsnType();
|
||||||
if (ObjectUtil.isNotEmpty(effectiveUserVOList)) {
|
if (ObjectUtil.isNotEmpty(effectiveUserVOList)) {
|
||||||
List<MktEffectiveUserVO> collect = (List) effectiveUserVOList.stream().filter((u) -> {
|
List<MktEffectiveUserVO> collect = effectiveUserVOList.stream().filter((u) -> {
|
||||||
boolean containsOrg = ObjectUtil.isNotEmpty(u.getOrgIdList()) && u.getOrgIdList().contains(orgId);
|
boolean containsOrg = ObjectUtil.isNotEmpty(u.getOrgIdList()) && u.getOrgIdList().contains(orgId);
|
||||||
boolean containsPsn = ObjectUtil.isNotEmpty(u.getPsnTypeList()) && u.getPsnTypeList().contains(psnType);
|
boolean containsPsn = ObjectUtil.isNotEmpty(u.getPsnTypeList()) && u.getPsnTypeList().contains(psnType);
|
||||||
return MktUserTypeEnum.INTERSECTION.key().equals(u.getUserType()) && containsOrg && containsPsn || MktUserTypeEnum.UNION_SET.key().equals(u.getUserType()) && (containsOrg || containsPsn);
|
return MktUserTypeEnum.INTERSECTION.key().equals(u.getUserType()) && containsOrg && containsPsn || MktUserTypeEnum.UNION_SET.key().equals(u.getUserType()) && (containsOrg || containsPsn);
|
||||||
|
|
|
||||||
|
|
@ -9,7 +9,6 @@ import com.bonus.canteen.core.notice.notice.v2.service.InformHistoryService;
|
||||||
import com.bonus.canteen.core.notice.notice.v2.service.InformRangeService;
|
import com.bonus.canteen.core.notice.notice.v2.service.InformRangeService;
|
||||||
import com.bonus.canteen.core.notice.notice.v2.vo.InformHistoryAppletPageVO;
|
import com.bonus.canteen.core.notice.notice.v2.vo.InformHistoryAppletPageVO;
|
||||||
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
import com.bonus.common.houqin.encrypt.RequiresGuest;
|
||||||
import com.bonus.common.houqin.utils.LeRequest;
|
|
||||||
import com.github.pagehelper.page.PageMethod;
|
import com.github.pagehelper.page.PageMethod;
|
||||||
import io.swagger.annotations.Api;
|
import io.swagger.annotations.Api;
|
||||||
import io.swagger.annotations.ApiOperation;
|
import io.swagger.annotations.ApiOperation;
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,45 @@
|
||||||
<?xml version="1.0" encoding="UTF-8" ?>
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
<mapper namespace="com.bonus.canteen.core.allocation.canteen.mapper.AllocCanteenMapper">
|
<mapper namespace="com.bonus.canteen.core.allocation.canteen.mapper.AllocCanteenMapper">
|
||||||
|
|
||||||
|
<!-- 分页查询食堂列表 -->
|
||||||
|
<select id="pageCanteen" resultType="com.bonus.canteen.core.allocation.canteen.vo.AllocCanteenVO">
|
||||||
|
SELECT
|
||||||
|
t1.canteen_id, t1.canteen_num, t1.canteen_name, t1.cust_id, t4.cust_name, t1.eff_id, t1.contact_tel, t1.business_state, t1.main_project,
|
||||||
|
t1.start_business_time, t1.end_business_time, t1.img_url, t1.capacity, t1.if_book, t1.if_reserve, t1.crtime, t1.uptime, t1.pay_code_url,
|
||||||
|
t1.special_flag, t2.area_id, t2.areaNameStr, t3.labelNameStr
|
||||||
|
FROM
|
||||||
|
alloc_canteen t1
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
area_id, CONCAT_WS('>', first_area_name, second_area_name, third_area_name) AS areaNameStr
|
||||||
|
FROM
|
||||||
|
alloc_area) t2
|
||||||
|
ON t1.area_id = t2.area_id
|
||||||
|
LEFT JOIN (
|
||||||
|
SELECT
|
||||||
|
canteen_id, GROUP_CONCAT(label_name) AS labelNameStr
|
||||||
|
FROM
|
||||||
|
alloc_label
|
||||||
|
GROUP BY canteen_id) t3
|
||||||
|
ON t1.canteen_id = t3.canteen_id
|
||||||
|
LEFT JOIN
|
||||||
|
cust_info t4 ON t1.cust_id = t4.cust_id
|
||||||
|
WHERE
|
||||||
|
t1.if_del = 2
|
||||||
|
AND t1.canteen_type = #{param.canteenType,jdbcType=TINYINT}
|
||||||
|
<if test="param.canteenName != null and param.canteenName != ''">
|
||||||
|
AND t1.canteen_name LIKE #{param.canteenName}
|
||||||
|
</if>
|
||||||
|
<if test="param.areaIdList != null and param.areaIdList.size() > 0">
|
||||||
|
AND t1.area_id IN
|
||||||
|
<foreach collection="param.areaIdList" item="areaId" separator="," open="(" close=")">
|
||||||
|
#{areaId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
ORDER BY t1.id DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
<!-- 通过区域id列表,查询食堂id列表 -->
|
<!-- 通过区域id列表,查询食堂id列表 -->
|
||||||
<select id="getCanteenIdListByAreaIdList" resultType="java.lang.Long">
|
<select id="getCanteenIdListByAreaIdList" resultType="java.lang.Long">
|
||||||
SELECT
|
SELECT
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,18 @@
|
||||||
|
<?xml version="1.0" encoding="UTF-8" ?>
|
||||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" >
|
||||||
|
<mapper namespace="com.bonus.canteen.core.allocation.canteen.mapper.AllocLabelMapper">
|
||||||
|
|
||||||
|
<!-- 分页查询标签 -->
|
||||||
|
<select id="pageLabel" resultType="com.bonus.canteen.core.allocation.canteen.vo.AllocLabelVO">
|
||||||
|
SELECT label_name
|
||||||
|
FROM alloc_label
|
||||||
|
<where>
|
||||||
|
<if test="labelName != null and labelName != ''">
|
||||||
|
label_name LIKE #{labelName}
|
||||||
|
</if>
|
||||||
|
</where>
|
||||||
|
GROUP BY label_name
|
||||||
|
ORDER BY label_name DESC
|
||||||
|
</select>
|
||||||
|
|
||||||
|
</mapper>
|
||||||
Loading…
Reference in New Issue