Commit fda8f480 by 吕明尚

验卷增加门店判断

parent 53f16571
package share.common.enums;
public enum StoreStatusEnum {
// 0:停业 1:正常营业
STOP("0", "停业"),
NORMAL("1", "正常营业"),
;
private String index;
private String value;
StoreStatusEnum() {
}
StoreStatusEnum(String index, String value) {
this.index = index;
this.value = value;
}
public String getIndex() {
return index;
}
public void setIndex(String index) {
this.index = index;
}
public String getValue() {
return value;
}
public void setValue(String value) {
this.value = value;
}
}
......@@ -103,6 +103,12 @@ public class QPServiceImpl implements QPService {
LambdaQueryWrapper<SStore> sStoreLambdaQueryWrapper = new LambdaQueryWrapper<>();
sStoreLambdaQueryWrapper.eq(SStore::getOpenShopUuid, openShopUuid);
SStore sStore = storeService.getOne(sStoreLambdaQueryWrapper);
if (ObjectUtils.isEmpty(sStore)) {
throw new RuntimeException("门店不存在");
}
if (sStore.getStatus().equals(StoreStatusEnum.STOP.getIndex())) {
throw new RuntimeException("门店已停止");
}
if (ObjectUtils.isNotEmpty(couponTwo)) {
//判断是否本人领取过
if (couponTwo.getConsumerId().equals(user.getId())) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment