Compare commits
3 Commits
| Author | SHA1 | Date |
|---|---|---|
|
|
ad61fc01dc | |
|
|
1c05dc0428 | |
|
|
9afd7c55ae |
|
|
@ -147,6 +147,11 @@
|
|||
<artifactId>hutool-all</artifactId>
|
||||
<version>5.8.11</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>org.redisson</groupId>
|
||||
<artifactId>redisson</artifactId>
|
||||
<version>3.43.0</version>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
|||
|
|
@ -11,12 +11,10 @@ import org.slf4j.Logger;
|
|||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.web.bind.annotation.PostMapping;
|
||||
import org.springframework.web.bind.annotation.RequestBody;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import javax.validation.Valid;
|
||||
import java.time.LocalDate;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -49,9 +47,14 @@ public class AllocCanteenController {
|
|||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author jsk
|
||||
* @param bean
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("移动端-查询预订日期列表")
|
||||
@PostMapping({"/list-reserve-date"})
|
||||
public List<LocalDate> listReserveDate(@RequestBody AllocMobileCanteenQueryDTO bean) {
|
||||
return this.allocStallService.listReserveDate(bean);
|
||||
public AjaxResult listReserveDate(@RequestBody AllocMobileCanteenQueryDTO bean) {
|
||||
return AjaxResult.success(this.allocStallService.listReserveDate(bean));
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -45,17 +45,17 @@ public class AllocStall {
|
|||
private Integer businessState;
|
||||
@ApiModelProperty("营业时间")
|
||||
@JsonDeserialize(
|
||||
using = LocalTimeDeserializer.class
|
||||
using = LocalTimeDeserializer.class
|
||||
)
|
||||
@JsonSerialize(
|
||||
using = LocalTimeSerializer.class
|
||||
using = LocalTimeSerializer.class
|
||||
)
|
||||
private LocalTime startBusinessTime;
|
||||
@JsonDeserialize(
|
||||
using = LocalTimeDeserializer.class
|
||||
using = LocalTimeDeserializer.class
|
||||
)
|
||||
@JsonSerialize(
|
||||
using = LocalTimeSerializer.class
|
||||
using = LocalTimeSerializer.class
|
||||
)
|
||||
private LocalTime endBusinessTime;
|
||||
@ApiModelProperty("是否启用叫号")
|
||||
|
|
@ -86,20 +86,20 @@ public class AllocStall {
|
|||
private String crby;
|
||||
@ApiModelProperty("创建时间")
|
||||
@JsonDeserialize(
|
||||
using = LocalDateTimeDeserializer.class
|
||||
using = LocalDateTimeDeserializer.class
|
||||
)
|
||||
@JsonSerialize(
|
||||
using = LocalDateTimeSerializer.class
|
||||
using = LocalDateTimeSerializer.class
|
||||
)
|
||||
private LocalDateTime crtime;
|
||||
@ApiModelProperty("更新人")
|
||||
private String upby;
|
||||
@ApiModelProperty("更新时间")
|
||||
@JsonDeserialize(
|
||||
using = LocalDateTimeDeserializer.class
|
||||
using = LocalDateTimeDeserializer.class
|
||||
)
|
||||
@JsonSerialize(
|
||||
using = LocalDateTimeSerializer.class
|
||||
using = LocalDateTimeSerializer.class
|
||||
)
|
||||
private LocalDateTime uptime;
|
||||
|
||||
|
|
@ -284,14 +284,14 @@ public class AllocStall {
|
|||
}
|
||||
|
||||
@JsonDeserialize(
|
||||
using = LocalTimeDeserializer.class
|
||||
using = LocalTimeDeserializer.class
|
||||
)
|
||||
public void setStartBusinessTime(final LocalTime startBusinessTime) {
|
||||
this.startBusinessTime = startBusinessTime;
|
||||
}
|
||||
|
||||
@JsonDeserialize(
|
||||
using = LocalTimeDeserializer.class
|
||||
using = LocalTimeDeserializer.class
|
||||
)
|
||||
public void setEndBusinessTime(final LocalTime endBusinessTime) {
|
||||
this.endBusinessTime = endBusinessTime;
|
||||
|
|
@ -350,7 +350,7 @@ public class AllocStall {
|
|||
}
|
||||
|
||||
@JsonDeserialize(
|
||||
using = LocalDateTimeDeserializer.class
|
||||
using = LocalDateTimeDeserializer.class
|
||||
)
|
||||
public void setCrtime(final LocalDateTime crtime) {
|
||||
this.crtime = crtime;
|
||||
|
|
@ -361,10 +361,460 @@ public class AllocStall {
|
|||
}
|
||||
|
||||
@JsonDeserialize(
|
||||
using = LocalDateTimeDeserializer.class
|
||||
using = LocalDateTimeDeserializer.class
|
||||
)
|
||||
public void setUptime(final LocalDateTime uptime) {
|
||||
this.uptime = uptime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof AllocStall)) {
|
||||
return false;
|
||||
} else {
|
||||
AllocStall other = (AllocStall)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
Object this$id = this.getId();
|
||||
Object other$id = other.getId();
|
||||
if (this$id == null) {
|
||||
if (other$id != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$id.equals(other$id)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$stallId = this.getStallId();
|
||||
Object other$stallId = other.getStallId();
|
||||
if (this$stallId == null) {
|
||||
if (other$stallId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$stallId.equals(other$stallId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$canteenId = this.getCanteenId();
|
||||
Object other$canteenId = other.getCanteenId();
|
||||
if (this$canteenId == null) {
|
||||
if (other$canteenId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$canteenId.equals(other$canteenId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label350: {
|
||||
Object this$areaId = this.getAreaId();
|
||||
Object other$areaId = other.getAreaId();
|
||||
if (this$areaId == null) {
|
||||
if (other$areaId == null) {
|
||||
break label350;
|
||||
}
|
||||
} else if (this$areaId.equals(other$areaId)) {
|
||||
break label350;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label343: {
|
||||
Object this$stallType = this.getStallType();
|
||||
Object other$stallType = other.getStallType();
|
||||
if (this$stallType == null) {
|
||||
if (other$stallType == null) {
|
||||
break label343;
|
||||
}
|
||||
} else if (this$stallType.equals(other$stallType)) {
|
||||
break label343;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$custId.equals(other$custId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label329: {
|
||||
Object this$businessState = this.getBusinessState();
|
||||
Object other$businessState = other.getBusinessState();
|
||||
if (this$businessState == null) {
|
||||
if (other$businessState == null) {
|
||||
break label329;
|
||||
}
|
||||
} else if (this$businessState.equals(other$businessState)) {
|
||||
break label329;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label322: {
|
||||
Object this$ifUseCallNum = this.getIfUseCallNum();
|
||||
Object other$ifUseCallNum = other.getIfUseCallNum();
|
||||
if (this$ifUseCallNum == null) {
|
||||
if (other$ifUseCallNum == null) {
|
||||
break label322;
|
||||
}
|
||||
} else if (this$ifUseCallNum.equals(other$ifUseCallNum)) {
|
||||
break label322;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$ifEnableDelivery = this.getIfEnableDelivery();
|
||||
Object other$ifEnableDelivery = other.getIfEnableDelivery();
|
||||
if (this$ifEnableDelivery == null) {
|
||||
if (other$ifEnableDelivery != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$ifEnableDelivery.equals(other$ifEnableDelivery)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$ifEnableOrder = this.getIfEnableOrder();
|
||||
Object other$ifEnableOrder = other.getIfEnableOrder();
|
||||
if (this$ifEnableOrder == null) {
|
||||
if (other$ifEnableOrder != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$ifEnableOrder.equals(other$ifEnableOrder)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label301: {
|
||||
Object this$ifBook = this.getIfBook();
|
||||
Object other$ifBook = other.getIfBook();
|
||||
if (this$ifBook == null) {
|
||||
if (other$ifBook == null) {
|
||||
break label301;
|
||||
}
|
||||
} else if (this$ifBook.equals(other$ifBook)) {
|
||||
break label301;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label294: {
|
||||
Object this$ifReserve = this.getIfReserve();
|
||||
Object other$ifReserve = other.getIfReserve();
|
||||
if (this$ifReserve == null) {
|
||||
if (other$ifReserve == null) {
|
||||
break label294;
|
||||
}
|
||||
} else if (this$ifReserve.equals(other$ifReserve)) {
|
||||
break label294;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$ifEnablePayCode = this.getIfEnablePayCode();
|
||||
Object other$ifEnablePayCode = other.getIfEnablePayCode();
|
||||
if (this$ifEnablePayCode == null) {
|
||||
if (other$ifEnablePayCode != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$ifEnablePayCode.equals(other$ifEnablePayCode)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label280: {
|
||||
Object this$ifDel = this.getIfDel();
|
||||
Object other$ifDel = other.getIfDel();
|
||||
if (this$ifDel == null) {
|
||||
if (other$ifDel == null) {
|
||||
break label280;
|
||||
}
|
||||
} else if (this$ifDel.equals(other$ifDel)) {
|
||||
break label280;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$stallNum = this.getStallNum();
|
||||
Object other$stallNum = other.getStallNum();
|
||||
if (this$stallNum == null) {
|
||||
if (other$stallNum != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$stallNum.equals(other$stallNum)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label266: {
|
||||
Object this$stallName = this.getStallName();
|
||||
Object other$stallName = other.getStallName();
|
||||
if (this$stallName == null) {
|
||||
if (other$stallName == null) {
|
||||
break label266;
|
||||
}
|
||||
} else if (this$stallName.equals(other$stallName)) {
|
||||
break label266;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$thirdStallId = this.getThirdStallId();
|
||||
Object other$thirdStallId = other.getThirdStallId();
|
||||
if (this$thirdStallId == null) {
|
||||
if (other$thirdStallId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$thirdStallId.equals(other$thirdStallId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$contactTel = this.getContactTel();
|
||||
Object other$contactTel = other.getContactTel();
|
||||
if (this$contactTel == null) {
|
||||
if (other$contactTel != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$contactTel.equals(other$contactTel)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$mainProject = this.getMainProject();
|
||||
Object other$mainProject = other.getMainProject();
|
||||
if (this$mainProject == null) {
|
||||
if (other$mainProject != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$mainProject.equals(other$mainProject)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label238: {
|
||||
Object this$startBusinessTime = this.getStartBusinessTime();
|
||||
Object other$startBusinessTime = other.getStartBusinessTime();
|
||||
if (this$startBusinessTime == null) {
|
||||
if (other$startBusinessTime == null) {
|
||||
break label238;
|
||||
}
|
||||
} else if (this$startBusinessTime.equals(other$startBusinessTime)) {
|
||||
break label238;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label231: {
|
||||
Object this$endBusinessTime = this.getEndBusinessTime();
|
||||
Object other$endBusinessTime = other.getEndBusinessTime();
|
||||
if (this$endBusinessTime == null) {
|
||||
if (other$endBusinessTime == null) {
|
||||
break label231;
|
||||
}
|
||||
} else if (this$endBusinessTime.equals(other$endBusinessTime)) {
|
||||
break label231;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$onLineMealCodePrefix = this.getOnLineMealCodePrefix();
|
||||
Object other$onLineMealCodePrefix = other.getOnLineMealCodePrefix();
|
||||
if (this$onLineMealCodePrefix == null) {
|
||||
if (other$onLineMealCodePrefix != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$onLineMealCodePrefix.equals(other$onLineMealCodePrefix)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label217: {
|
||||
Object this$offLineMealCodePrefix = this.getOffLineMealCodePrefix();
|
||||
Object other$offLineMealCodePrefix = other.getOffLineMealCodePrefix();
|
||||
if (this$offLineMealCodePrefix == null) {
|
||||
if (other$offLineMealCodePrefix == null) {
|
||||
break label217;
|
||||
}
|
||||
} else if (this$offLineMealCodePrefix.equals(other$offLineMealCodePrefix)) {
|
||||
break label217;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label210: {
|
||||
Object this$deliveries = this.getDeliveries();
|
||||
Object other$deliveries = other.getDeliveries();
|
||||
if (this$deliveries == null) {
|
||||
if (other$deliveries == null) {
|
||||
break label210;
|
||||
}
|
||||
} else if (this$deliveries.equals(other$deliveries)) {
|
||||
break label210;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$imgUrl = this.getImgUrl();
|
||||
Object other$imgUrl = other.getImgUrl();
|
||||
if (this$imgUrl == null) {
|
||||
if (other$imgUrl != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$imgUrl.equals(other$imgUrl)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$payCodeUrl = this.getPayCodeUrl();
|
||||
Object other$payCodeUrl = other.getPayCodeUrl();
|
||||
if (this$payCodeUrl == null) {
|
||||
if (other$payCodeUrl != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$payCodeUrl.equals(other$payCodeUrl)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label189: {
|
||||
Object this$crby = this.getCrby();
|
||||
Object other$crby = other.getCrby();
|
||||
if (this$crby == null) {
|
||||
if (other$crby == null) {
|
||||
break label189;
|
||||
}
|
||||
} else if (this$crby.equals(other$crby)) {
|
||||
break label189;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label182: {
|
||||
Object this$crtime = this.getCrtime();
|
||||
Object other$crtime = other.getCrtime();
|
||||
if (this$crtime == null) {
|
||||
if (other$crtime == null) {
|
||||
break label182;
|
||||
}
|
||||
} else if (this$crtime.equals(other$crtime)) {
|
||||
break label182;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$upby = this.getUpby();
|
||||
Object other$upby = other.getUpby();
|
||||
if (this$upby == null) {
|
||||
if (other$upby != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$upby.equals(other$upby)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$uptime = this.getUptime();
|
||||
Object other$uptime = other.getUptime();
|
||||
if (this$uptime == null) {
|
||||
if (other$uptime != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$uptime.equals(other$uptime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof AllocStall;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $id = this.getId();
|
||||
result = result * 59 + ($id == null ? 43 : $id.hashCode());
|
||||
Object $stallId = this.getStallId();
|
||||
result = result * 59 + ($stallId == null ? 43 : $stallId.hashCode());
|
||||
Object $canteenId = this.getCanteenId();
|
||||
result = result * 59 + ($canteenId == null ? 43 : $canteenId.hashCode());
|
||||
Object $areaId = this.getAreaId();
|
||||
result = result * 59 + ($areaId == null ? 43 : $areaId.hashCode());
|
||||
Object $stallType = this.getStallType();
|
||||
result = result * 59 + ($stallType == null ? 43 : $stallType.hashCode());
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
Object $businessState = this.getBusinessState();
|
||||
result = result * 59 + ($businessState == null ? 43 : $businessState.hashCode());
|
||||
Object $ifUseCallNum = this.getIfUseCallNum();
|
||||
result = result * 59 + ($ifUseCallNum == null ? 43 : $ifUseCallNum.hashCode());
|
||||
Object $ifEnableDelivery = this.getIfEnableDelivery();
|
||||
result = result * 59 + ($ifEnableDelivery == null ? 43 : $ifEnableDelivery.hashCode());
|
||||
Object $ifEnableOrder = this.getIfEnableOrder();
|
||||
result = result * 59 + ($ifEnableOrder == null ? 43 : $ifEnableOrder.hashCode());
|
||||
Object $ifBook = this.getIfBook();
|
||||
result = result * 59 + ($ifBook == null ? 43 : $ifBook.hashCode());
|
||||
Object $ifReserve = this.getIfReserve();
|
||||
result = result * 59 + ($ifReserve == null ? 43 : $ifReserve.hashCode());
|
||||
Object $ifEnablePayCode = this.getIfEnablePayCode();
|
||||
result = result * 59 + ($ifEnablePayCode == null ? 43 : $ifEnablePayCode.hashCode());
|
||||
Object $ifDel = this.getIfDel();
|
||||
result = result * 59 + ($ifDel == null ? 43 : $ifDel.hashCode());
|
||||
Object $stallNum = this.getStallNum();
|
||||
result = result * 59 + ($stallNum == null ? 43 : $stallNum.hashCode());
|
||||
Object $stallName = this.getStallName();
|
||||
result = result * 59 + ($stallName == null ? 43 : $stallName.hashCode());
|
||||
Object $thirdStallId = this.getThirdStallId();
|
||||
result = result * 59 + ($thirdStallId == null ? 43 : $thirdStallId.hashCode());
|
||||
Object $contactTel = this.getContactTel();
|
||||
result = result * 59 + ($contactTel == null ? 43 : $contactTel.hashCode());
|
||||
Object $mainProject = this.getMainProject();
|
||||
result = result * 59 + ($mainProject == null ? 43 : $mainProject.hashCode());
|
||||
Object $startBusinessTime = this.getStartBusinessTime();
|
||||
result = result * 59 + ($startBusinessTime == null ? 43 : $startBusinessTime.hashCode());
|
||||
Object $endBusinessTime = this.getEndBusinessTime();
|
||||
result = result * 59 + ($endBusinessTime == null ? 43 : $endBusinessTime.hashCode());
|
||||
Object $onLineMealCodePrefix = this.getOnLineMealCodePrefix();
|
||||
result = result * 59 + ($onLineMealCodePrefix == null ? 43 : $onLineMealCodePrefix.hashCode());
|
||||
Object $offLineMealCodePrefix = this.getOffLineMealCodePrefix();
|
||||
result = result * 59 + ($offLineMealCodePrefix == null ? 43 : $offLineMealCodePrefix.hashCode());
|
||||
Object $deliveries = this.getDeliveries();
|
||||
result = result * 59 + ($deliveries == null ? 43 : $deliveries.hashCode());
|
||||
Object $imgUrl = this.getImgUrl();
|
||||
result = result * 59 + ($imgUrl == null ? 43 : $imgUrl.hashCode());
|
||||
Object $payCodeUrl = this.getPayCodeUrl();
|
||||
result = result * 59 + ($payCodeUrl == null ? 43 : $payCodeUrl.hashCode());
|
||||
Object $crby = this.getCrby();
|
||||
result = result * 59 + ($crby == null ? 43 : $crby.hashCode());
|
||||
Object $crtime = this.getCrtime();
|
||||
result = result * 59 + ($crtime == null ? 43 : $crtime.hashCode());
|
||||
Object $upby = this.getUpby();
|
||||
result = result * 59 + ($upby == null ? 43 : $upby.hashCode());
|
||||
Object $uptime = this.getUptime();
|
||||
result = result * 59 + ($uptime == null ? 43 : $uptime.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Long var10000 = this.getId();
|
||||
return "AllocStall(id=" + var10000 + ", stallId=" + this.getStallId() + ", stallNum=" + this.getStallNum() + ", stallName=" + this.getStallName() + ", canteenId=" + this.getCanteenId() + ", areaId=" + this.getAreaId() + ", stallType=" + this.getStallType() + ", thirdStallId=" + this.getThirdStallId() + ", custId=" + this.getCustId() + ", contactTel=" + this.getContactTel() + ", mainProject=" + this.getMainProject() + ", businessState=" + this.getBusinessState() + ", startBusinessTime=" + String.valueOf(this.getStartBusinessTime()) + ", endBusinessTime=" + String.valueOf(this.getEndBusinessTime()) + ", ifUseCallNum=" + this.getIfUseCallNum() + ", onLineMealCodePrefix=" + this.getOnLineMealCodePrefix() + ", offLineMealCodePrefix=" + this.getOffLineMealCodePrefix() + ", ifEnableDelivery=" + this.getIfEnableDelivery() + ", deliveries=" + this.getDeliveries() + ", ifEnableOrder=" + this.getIfEnableOrder() + ", imgUrl=" + this.getImgUrl() + ", ifBook=" + this.getIfBook() + ", ifReserve=" + this.getIfReserve() + ", ifEnablePayCode=" + this.getIfEnablePayCode() + ", payCodeUrl=" + this.getPayCodeUrl() + ", ifDel=" + this.getIfDel() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ")";
|
||||
}
|
||||
|
||||
public AllocStall() {
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ package com.bonus.core.allocation.canteen.service.impl;
|
|||
import cn.hutool.core.text.CharSequenceUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.core.allocation.api.AllocHolidayApi;
|
||||
import com.bonus.core.allocation.api.AllocOrderMetadataApi;
|
||||
|
|
@ -51,7 +51,7 @@ public class AllocStallServiceImpl extends ServiceImpl<AllocStallMapper, AllocSt
|
|||
if (CharSequenceUtil.isNotBlank(allocStallStr)) {
|
||||
return (AllocStall)JSONUtil.toBean(allocStallStr, AllocStall.class);
|
||||
} else {
|
||||
AllocStall allocStall = this.getOne(new LambdaQueryWrapper<AllocStall>().eq(AllocStall::getStallId, stallId));
|
||||
AllocStall allocStall = (AllocStall)this.getOne((Wrapper) Wrappers.lambdaQuery(AllocStall.class).eq(AllocStall::getStallId, stallId));
|
||||
allocStallStr = JSONUtil.toJsonStr(allocStall);
|
||||
RedisUtil.setString(cacheKey, allocStallStr, 3600L);
|
||||
return allocStall;
|
||||
|
|
|
|||
|
|
@ -0,0 +1,17 @@
|
|||
package com.bonus.core.allocation.holiday.config;
|
||||
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.context.annotation.Bean;
|
||||
import org.springframework.context.annotation.Configuration;
|
||||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
@Configuration
|
||||
public class RestTemplateConfig {
|
||||
private static final Logger log = LoggerFactory.getLogger(RestTemplateConfig.class);
|
||||
|
||||
@Bean({"holidayRest"})
|
||||
public RestTemplate createRest() {
|
||||
return new RestTemplate();
|
||||
}
|
||||
}
|
||||
|
|
@ -9,7 +9,6 @@ import com.alibaba.fastjson.TypeReference;
|
|||
import com.alibaba.fastjson.parser.Feature;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.CollectionUtils;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
|
|
@ -25,7 +24,6 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.web.client.RestTemplate;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.lang.reflect.Type;
|
||||
import java.time.*;
|
||||
import java.util.*;
|
||||
|
||||
|
|
@ -39,7 +37,7 @@ public class MktHolidayServiceImpl extends ServiceImpl<MktHolidayMapper, MktHoli
|
|||
|
||||
@Override
|
||||
public Integer getHolidayType(LocalDate searchDate) {
|
||||
MktHoliday mktHoliday = (MktHoliday)((MktHolidayMapper)this.baseMapper).selectOne((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MktHoliday.class).eq(MktHoliday::getIfDel, LeConstants.COMMON_NO)).apply("holDate IN ({0})",new Object[]{searchDate.atStartOfDay()}));
|
||||
MktHoliday mktHoliday = (MktHoliday)((MktHolidayMapper)this.baseMapper).selectOne((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MktHoliday.class).eq(MktHoliday::getIfDel, LeConstants.COMMON_NO)).apply("hol_date IN ({0})",new Object[]{searchDate.atStartOfDay()}));
|
||||
return Objects.isNull(mktHoliday) ? null : mktHoliday.getHolType();
|
||||
}
|
||||
|
||||
|
|
@ -64,7 +62,7 @@ public class MktHolidayServiceImpl extends ServiceImpl<MktHolidayMapper, MktHoli
|
|||
String deductionConfJsonStr = RedisUtil.getString(key);
|
||||
|
||||
try {
|
||||
dateList = (List)JSON.parseObject(deductionConfJsonStr, new TypeReference<List<Date>>((Type) this) {
|
||||
dateList = (List)JSON.parseObject(deductionConfJsonStr, new TypeReference<List<Date>>() {
|
||||
}, new Feature[0]);
|
||||
} catch (Exception var5) {
|
||||
log.error("[节假日]读取节假日缓存失败," + var5.getMessage(), var5);
|
||||
|
|
|
|||
|
|
@ -0,0 +1,188 @@
|
|||
package com.bonus.core.common.constant;
|
||||
|
||||
public enum LeRetCodeEnum {
|
||||
SUCC(10000, "成功"),
|
||||
SUCC_MAC_ORD(10001, "设备单号重复,特殊成功标识"),
|
||||
FAIL(40004, "失败"),
|
||||
PAY_BALANCE_NO_ENOUGH(50001, "余额不足"),
|
||||
PAY_PERSONAL_NO_EXIT(50002, "人员不存在"),
|
||||
PAY_CARD_NO_EXIT(50003, "卡号不正确"),
|
||||
PAY_CARD_STATE_ABNORMAL(50004, "卡片异常"),
|
||||
PAY_ACC_STATE_ABNORMAL(50005, "账户异常"),
|
||||
PAY_MACHINE_NO_EXIT(50006, "设备不存在"),
|
||||
PAY_MACHINE_NO_ALLOW(50007, "不允许当前设备消费"),
|
||||
PAY_PERSONAL_NO_ALLOWTYPE(50008, "当前人员未设置类别消费"),
|
||||
PAY_TIME_NO_EXIT(50009, "时间段错误"),
|
||||
PAY_TIME_QUOTA_LIMIT(50010, "超出限额限次"),
|
||||
PAY_SELECT_ORD_NO_EXIT(50011, "订单号不存在"),
|
||||
PAY_QRCODE_ORD_ERROR(50012, "扫码支付失败"),
|
||||
PAY_QRCODE_ING(50013, "扫码支付中"),
|
||||
PAY_TYPE_NO_OPEN(50014, "支付方式未开通"),
|
||||
PAY_ORD_ID_EXIT(50015, "该订单已存在"),
|
||||
PAY_RECHARGE_NO_EXIT(50016, "充值记录不存在"),
|
||||
PAY_THIRD_PAY_FAIL(50017, "第三方支付失败"),
|
||||
PAY_QR_ILLEGAL(50018, "非法二维码"),
|
||||
PAY_QR_NOT_PAY(50019, "费支付二维码"),
|
||||
PAY_COUPON_UNIVERSAL_DISABLED(50020, "通用券不可用"),
|
||||
PAY_ORD_LOSE(50021, "该订单已失效"),
|
||||
PAY_ORD_CANCEL(50022, "该订单已取消"),
|
||||
PAY_ORD_ING(50023, "订单进行中"),
|
||||
PAY_ORD_END(50024, "该订单已完结"),
|
||||
PAY_ORD_EXISTS_UN_PAY(50025, "存在未支付订单"),
|
||||
PAY_ORD_LESS_THAN_DELIVERY_MIN_AMOUNT(50026, "未达到起送金额"),
|
||||
CORE_PARAM_ERROR(50501, "上送参数错误"),
|
||||
BAS_CONF_NOT_SET(50502, "基础配置没有设置"),
|
||||
CORE_DATE_START_GREATER_END(50503, "开始时间大于结束时间"),
|
||||
BAS_INTERVAL_NO_EXIT(50504, "餐次信息不存在"),
|
||||
CORE_IMPORT_FORMAT_ERR(50601, "导入格式错误"),
|
||||
CORE_IMPORT_EMPTY(50602, "导入对象为空"),
|
||||
CORE_IMPORT_FIELD_EMPTY(50603, "导入字段为空"),
|
||||
ACC_CRAD_NUM_EXIST(51001, "餐卡卡序列号已经存在"),
|
||||
ACC_STATE_EXCEPTION(51002, "账户状态异常"),
|
||||
ACC_CARD_NUM_MAX_LIMIT(51003, "卡号已经达到最大限制"),
|
||||
ACC_DATA_ALREADY_EXIST(51004, "数据已经存在"),
|
||||
ACC_SUBRULE_ALREADY_EXIST(51005, "存在其他类型的补贴规则"),
|
||||
RECHARGE_NO_AUTH(51006, "充值没有权限"),
|
||||
ACC_INFO_NO_EXIT(51007, "账户信息不存在"),
|
||||
RECHARGE_NO_EXIST(51008, "充值记录不存在"),
|
||||
REFUND_AMOUNT_GREATER(51009, "退款金额大于对应金额"),
|
||||
PAY_FAIL_REFUSE_REFUND(51010, "未支付成功,不允许退款"),
|
||||
CUST_CLOSE_REFUSE_REFUND(51011, "人员注销,不允许退款"),
|
||||
NOT_REPEAT_REFUND(51012, "不允许重复退款"),
|
||||
ACC_BAL_NOT_ENOUGH(51013, "账户余额不足"),
|
||||
BAS_TABLE_IN_USE(51501, "餐桌正在使用中"),
|
||||
BAS_TABLE_NOT_IN_USE(51502, "餐桌非使用中"),
|
||||
BAS_TABLE_NOT_BIND_ORD(51503, "餐桌没有绑定订单"),
|
||||
BAS_CANTEEN_NO_EXIT(51504, "食堂信息不存在"),
|
||||
BAS_NO_SYS_CARDINFO(51505, "系统卡信息为空"),
|
||||
CUST_PERSONAL_NO_EXIT(52001, "人员不存在"),
|
||||
CUST_CASUAL_NO_BIND(52002, "临时人员没有绑定"),
|
||||
CUSTINFO_ALREADY_EXISTS(52003, "人员信息已经存在"),
|
||||
CUST_ROOT_DEL_NOT_ALLOW(52004, "根节点不允许删除"),
|
||||
CUST_EXIST_RELAT(52005, "存在人员关联"),
|
||||
CUST_PHOTO_FACE_FAIL(52006, "生成失败"),
|
||||
CUST_STATE_EXCEPTION(52007, "人员状态异常"),
|
||||
CUST_LIMIT_ID_MAX_LIMIT(52008, "人员限制id已经达到最大限制"),
|
||||
CUST_PSN_TYPE_OUT_RANGE(52009, "人员类别超出范围"),
|
||||
CUST_CASUAL_UNABLE_BIND(52010, "临时人员无法绑定"),
|
||||
CUST_IMPORT_FORMAT_ERR(52011, "导入字段格式错误"),
|
||||
MAC_NO_HEADER_SN(53001, "缺少SN"),
|
||||
MAC_APP_VERSION_NOEXIT(53002, "未找到更新包"),
|
||||
MAC_APP_VERSION_NOTUP(53003, "APP已是最新版本"),
|
||||
MAC_IS_NOT_EMPTY_MEALS_COUNTER(53004, "取餐柜不是空的"),
|
||||
MAC_NO_PARAM_LIST(53005, "list参数为空"),
|
||||
MAC_NO_PARAM_ENTITY(53006, "实体参数为空"),
|
||||
MAC_NO_PARAM_VARIABLE(53007, "变量参数为空"),
|
||||
MAC_ERR_SQL_DATE(53008, "数据库数据错误"),
|
||||
MAC_ERR_BIND(53009, "绑定餐盘失败"),
|
||||
MAC_MACHINE_NO_EXIT(53010, "设备资料不存在"),
|
||||
MAC_MACHINE_NO_BIND_CANTEEN(53011, "该设备没有绑定食堂"),
|
||||
MENU_NO_RECIPE(53501, "传入菜谱不存在"),
|
||||
MENU_NO_RECIPE_TYPE(53502, "传入菜谱类型不存在"),
|
||||
MENU_REPEAT_NAME(53503, "名称重复"),
|
||||
MENU_IS_USED_DISHES_COOK(53504, "菜品灶类已使用"),
|
||||
MENU_REPEAT_DISHES_LABEL(53505, "菜品标签名称重复"),
|
||||
MENU_IS_USED_DISHES_LABEL(53506, "菜品标签已使用"),
|
||||
MENU_EXCEED_MAX_LIMIT(53507, "超出数量限制"),
|
||||
MENU_NO_MATERIAL(53508, "菜品没有原材料"),
|
||||
MENU_IS_USED_DISHES(53509, "菜品已使用"),
|
||||
MENU_NOT_EXIST_DISHES(53510, "菜品不存在"),
|
||||
MENU_NOT_EXIST_RECIPE_DETAIL(53511, "菜谱详情不存在"),
|
||||
MENU_NOT_EXIST_RECIPE(53512, "菜谱不存在"),
|
||||
MENU_REPEAT_DISHES_TASTE(53513, "菜品口味名称重复"),
|
||||
MENU_IS_USED_DISHES_TASTE(53514, "菜品口味已使用"),
|
||||
MENU_REPEAT_DISHES_TYPE(53515, "菜品类型名称重复"),
|
||||
MENU_IS_USED_DISHES_TYPE(53516, "菜品类型已使用"),
|
||||
MENU_IS_USED_MATERIAL(53517, "菜品原料已使用"),
|
||||
MENU_NO_DISHES(53518, "没有菜品"),
|
||||
MENU_NOT_EXIST_PACKAGE_MEAL(53519, "套餐不存在"),
|
||||
MENU_NO_PROPORTION(53520, "没有占比"),
|
||||
MENU_IS_USED_PRODUCT(53521, "商品已使用"),
|
||||
MENU_NOT_EXIST_PRODUCT(53522, "商品不存在"),
|
||||
MENU_ERR_RECIPE_TYPE(53523, "菜谱类型错误"),
|
||||
MENU_ERR_RECIPE_DEFAULT_LIMIT(53524, "默认菜谱数量错误"),
|
||||
MENU_REPEAT_DISHES(53525, "菜品重复"),
|
||||
MENU_REPEAT_PRODUCT(53526, "商品重复"),
|
||||
MENU_REPEAT_PACKAGE_MEAL(53527, "套餐重复"),
|
||||
MENU_NO_APPLY_DATE(53528, "没有启用日期"),
|
||||
MENU_NO_PARAM_LIST(53529, "list参数为空"),
|
||||
MENU_NO_PARAM_ENTITY(53530, "实体参数为空"),
|
||||
MENU_NO_PARAM_VARIABLE(53531, "变量参数为空"),
|
||||
MENU_ERR_SQL_DATE(53532, "数据库数据错误"),
|
||||
MENU_EXCEED_RESTRICT_NUM(53533, "超出个人限购数量"),
|
||||
MENU_EXCEED_SURPLUS_NUM(53534, "库存不足或者超出个人限购数量"),
|
||||
MENU_NOT_EXIST_TIME_INTERVAL(53535, "餐次不存在"),
|
||||
MENU_REPEAT_RECIPE(53536, "菜谱重复"),
|
||||
MENU_NOT_IN_TIME_INTERVAL(53537, "不在时间段内"),
|
||||
MENU_REPEAT_DISHES_COOK(53538, "名称重复"),
|
||||
MENU_IS_USED_DISHES_CLASSIFY(53539, "菜品分类已使用"),
|
||||
MENU_IS_USED_DISHES_EFFECT(53540, "菜品功效已使用"),
|
||||
MENU_IS_USED_DISHES_STYLE(53541, "菜系已使用"),
|
||||
MENU_IS_USED_DISHES_SUIT(53542, "适宜人群已使用"),
|
||||
MERCHANT_NOT_REGISTER(54001, "商家未注册"),
|
||||
MKT_ERROR_PARAM(54501, "入参错误"),
|
||||
MGR_REPEAT_ROLE_NAME(57001, "角色名称重复"),
|
||||
MGR_REPEAT_USER_NAME(57002, "用户名称重复"),
|
||||
DRP_NO_SUPPLIER_ID(57501, "传入的供应商id为空"),
|
||||
DRP_NO_WAREHOUSE_ID(57502, "传入的仓库id为空"),
|
||||
DRP_NO_UNIT_ID(57503, "传入的计量单位id为空"),
|
||||
DRP_REPEAT_UNIT(53504, "计量单位名称重复"),
|
||||
DRP_REPEAT_HOUSE_MATERIAL(53505, "仓库原料重复"),
|
||||
DRP_EXIST_MATERIAL_NUM(53506, "库存不为0"),
|
||||
DRP_NOT_EXIST_HOUSE_MATERIAL(53507, "库存配置不存在"),
|
||||
DRP_IS_USED_HOUSE_MATERIAL(53508, "库存配置已使用"),
|
||||
DRP_ERR_SQL_DATE(53509, "数据库数据错误"),
|
||||
DRP_NOT_EXIST_INTO_INVENTORY(53521, "入库记录不存在"),
|
||||
DRP_ALREADY_INTO_INVENTORY(53511, "已入库"),
|
||||
DRP_INVENTORY_DEFICIENCY(53512, "原料库存不足"),
|
||||
DRP_NOT_EXIST_OUT_INVENTORY(53513, "出库记录不存在"),
|
||||
DRP_ALREADY_OUT_INVENTORY(53514, "已入库"),
|
||||
DRP_NOT_EXIST_PURCHASE_ORDER(53515, "采购订单不存在"),
|
||||
DRP_NOT_EXIST_PURCHASE_PLAN(53516, "采购计划不存在"),
|
||||
DRP_NOT_EXIST_ISSUE(53517, "采购计划不存在"),
|
||||
DRP_REPEAT_MATERIAL_CATEGORY(53518, "原料类别名称重复"),
|
||||
DRP_NOT_EXIST_CHECK_INVENTORY(53519, "盘点记录不存在"),
|
||||
DRP_ALREADY_CHECK_INVENTORY(53520, "已盘点"),
|
||||
ORD_TRADE_ASSEM_ERR(55001, "组装交易明细数据错误"),
|
||||
ORD_REFUND_FAIL(55002, "订单退款失败"),
|
||||
ORD_INFO_NO_EXIT(55003, "订单信息不存在"),
|
||||
ORD_UNABLE_SUBSCRIBE(55004, "不能预订订单"),
|
||||
ORD_STATE_ERR(55005, "订单状态错误"),
|
||||
PRE_ORDER_FAIL(56501, "预下单失败"),
|
||||
PRE_API_FAIL(56502, "API调用失败"),
|
||||
CUSTOM_FLOW_EXE_FAIL(56503, "流程执行结果失败"),
|
||||
CUSTOM_FLOW_EXE_EXCEPTION(56504, "流程执行异常(非自定义异常)"),
|
||||
MENUAI_NO_CONFIG(57051, "该档口菜品识别服务未配置!"),
|
||||
MENUAI_NO_UPLOAD_DTO(57052, "菜品图片上传接口缺少入参"),
|
||||
MENUAI_NO_RECIPE(57053, "今日菜谱该餐次无菜,请先配置菜谱"),
|
||||
MENUAI_REGIST_EXCEPTION(57080, "注册异常"),
|
||||
MENUAI_REGISTING(57081, "注册中..."),
|
||||
DD_LACK_DD_CONFIG_PARAM(57151, "缺少公司id和应用id入参!"),
|
||||
DD_NOT_EXIT_SOURCE(57152, "不存在此来源!"),
|
||||
FACE_REGISTER_FAIL(59000, "人脸照片上传注册失败!");
|
||||
|
||||
private final Integer key;
|
||||
private final String desc;
|
||||
|
||||
private LeRetCodeEnum(Integer key, String desc) {
|
||||
this.key = key;
|
||||
this.desc = desc;
|
||||
}
|
||||
|
||||
public static boolean ifSuccess(Integer code) {
|
||||
return SUCC.getKey().equals(code);
|
||||
}
|
||||
|
||||
public Integer getKey() {
|
||||
return this.key;
|
||||
}
|
||||
|
||||
public String getDesc() {
|
||||
return this.desc;
|
||||
}
|
||||
|
||||
// $FF: synthetic method
|
||||
private static LeRetCodeEnum[] $values() {
|
||||
return new LeRetCodeEnum[]{SUCC, SUCC_MAC_ORD, FAIL, PAY_BALANCE_NO_ENOUGH, PAY_PERSONAL_NO_EXIT, PAY_CARD_NO_EXIT, PAY_CARD_STATE_ABNORMAL, PAY_ACC_STATE_ABNORMAL, PAY_MACHINE_NO_EXIT, PAY_MACHINE_NO_ALLOW, PAY_PERSONAL_NO_ALLOWTYPE, PAY_TIME_NO_EXIT, PAY_TIME_QUOTA_LIMIT, PAY_SELECT_ORD_NO_EXIT, PAY_QRCODE_ORD_ERROR, PAY_QRCODE_ING, PAY_TYPE_NO_OPEN, PAY_ORD_ID_EXIT, PAY_RECHARGE_NO_EXIT, PAY_THIRD_PAY_FAIL, PAY_QR_ILLEGAL, PAY_QR_NOT_PAY, PAY_COUPON_UNIVERSAL_DISABLED, PAY_ORD_LOSE, PAY_ORD_CANCEL, PAY_ORD_ING, PAY_ORD_END, PAY_ORD_EXISTS_UN_PAY, PAY_ORD_LESS_THAN_DELIVERY_MIN_AMOUNT, CORE_PARAM_ERROR, BAS_CONF_NOT_SET, CORE_DATE_START_GREATER_END, BAS_INTERVAL_NO_EXIT, CORE_IMPORT_FORMAT_ERR, CORE_IMPORT_EMPTY, CORE_IMPORT_FIELD_EMPTY, ACC_CRAD_NUM_EXIST, ACC_STATE_EXCEPTION, ACC_CARD_NUM_MAX_LIMIT, ACC_DATA_ALREADY_EXIST, ACC_SUBRULE_ALREADY_EXIST, RECHARGE_NO_AUTH, ACC_INFO_NO_EXIT, RECHARGE_NO_EXIST, REFUND_AMOUNT_GREATER, PAY_FAIL_REFUSE_REFUND, CUST_CLOSE_REFUSE_REFUND, NOT_REPEAT_REFUND, ACC_BAL_NOT_ENOUGH, BAS_TABLE_IN_USE, BAS_TABLE_NOT_IN_USE, BAS_TABLE_NOT_BIND_ORD, BAS_CANTEEN_NO_EXIT, BAS_NO_SYS_CARDINFO, CUST_PERSONAL_NO_EXIT, CUST_CASUAL_NO_BIND, CUSTINFO_ALREADY_EXISTS, CUST_ROOT_DEL_NOT_ALLOW, CUST_EXIST_RELAT, CUST_PHOTO_FACE_FAIL, CUST_STATE_EXCEPTION, CUST_LIMIT_ID_MAX_LIMIT, CUST_PSN_TYPE_OUT_RANGE, CUST_CASUAL_UNABLE_BIND, CUST_IMPORT_FORMAT_ERR, MAC_NO_HEADER_SN, MAC_APP_VERSION_NOEXIT, MAC_APP_VERSION_NOTUP, MAC_IS_NOT_EMPTY_MEALS_COUNTER, MAC_NO_PARAM_LIST, MAC_NO_PARAM_ENTITY, MAC_NO_PARAM_VARIABLE, MAC_ERR_SQL_DATE, MAC_ERR_BIND, MAC_MACHINE_NO_EXIT, MAC_MACHINE_NO_BIND_CANTEEN, MENU_NO_RECIPE, MENU_NO_RECIPE_TYPE, MENU_REPEAT_NAME, MENU_IS_USED_DISHES_COOK, MENU_REPEAT_DISHES_LABEL, MENU_IS_USED_DISHES_LABEL, MENU_EXCEED_MAX_LIMIT, MENU_NO_MATERIAL, MENU_IS_USED_DISHES, MENU_NOT_EXIST_DISHES, MENU_NOT_EXIST_RECIPE_DETAIL, MENU_NOT_EXIST_RECIPE, MENU_REPEAT_DISHES_TASTE, MENU_IS_USED_DISHES_TASTE, MENU_REPEAT_DISHES_TYPE, MENU_IS_USED_DISHES_TYPE, MENU_IS_USED_MATERIAL, MENU_NO_DISHES, MENU_NOT_EXIST_PACKAGE_MEAL, MENU_NO_PROPORTION, MENU_IS_USED_PRODUCT, MENU_NOT_EXIST_PRODUCT, MENU_ERR_RECIPE_TYPE, MENU_ERR_RECIPE_DEFAULT_LIMIT, MENU_REPEAT_DISHES, MENU_REPEAT_PRODUCT, MENU_REPEAT_PACKAGE_MEAL, MENU_NO_APPLY_DATE, MENU_NO_PARAM_LIST, MENU_NO_PARAM_ENTITY, MENU_NO_PARAM_VARIABLE, MENU_ERR_SQL_DATE, MENU_EXCEED_RESTRICT_NUM, MENU_EXCEED_SURPLUS_NUM, MENU_NOT_EXIST_TIME_INTERVAL, MENU_REPEAT_RECIPE, MENU_NOT_IN_TIME_INTERVAL, MENU_REPEAT_DISHES_COOK, MENU_IS_USED_DISHES_CLASSIFY, MENU_IS_USED_DISHES_EFFECT, MENU_IS_USED_DISHES_STYLE, MENU_IS_USED_DISHES_SUIT, MERCHANT_NOT_REGISTER, MKT_ERROR_PARAM, MGR_REPEAT_ROLE_NAME, MGR_REPEAT_USER_NAME, DRP_NO_SUPPLIER_ID, DRP_NO_WAREHOUSE_ID, DRP_NO_UNIT_ID, DRP_REPEAT_UNIT, DRP_REPEAT_HOUSE_MATERIAL, DRP_EXIST_MATERIAL_NUM, DRP_NOT_EXIST_HOUSE_MATERIAL, DRP_IS_USED_HOUSE_MATERIAL, DRP_ERR_SQL_DATE, DRP_NOT_EXIST_INTO_INVENTORY, DRP_ALREADY_INTO_INVENTORY, DRP_INVENTORY_DEFICIENCY, DRP_NOT_EXIST_OUT_INVENTORY, DRP_ALREADY_OUT_INVENTORY, DRP_NOT_EXIST_PURCHASE_ORDER, DRP_NOT_EXIST_PURCHASE_PLAN, DRP_NOT_EXIST_ISSUE, DRP_REPEAT_MATERIAL_CATEGORY, DRP_NOT_EXIST_CHECK_INVENTORY, DRP_ALREADY_CHECK_INVENTORY, ORD_TRADE_ASSEM_ERR, ORD_REFUND_FAIL, ORD_INFO_NO_EXIT, ORD_UNABLE_SUBSCRIBE, ORD_STATE_ERR, PRE_ORDER_FAIL, PRE_API_FAIL, CUSTOM_FLOW_EXE_FAIL, CUSTOM_FLOW_EXE_EXCEPTION, MENUAI_NO_CONFIG, MENUAI_NO_UPLOAD_DTO, MENUAI_NO_RECIPE, MENUAI_REGIST_EXCEPTION, MENUAI_REGISTING, DD_LACK_DD_CONFIG_PARAM, DD_NOT_EXIT_SOURCE, FACE_REGISTER_FAIL};
|
||||
}
|
||||
}
|
||||
|
|
@ -2,6 +2,9 @@ package com.bonus.core.common.redis;
|
|||
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import com.bonus.core.common.utils.SpringContextHolder;
|
||||
import org.redisson.RedissonLock;
|
||||
import org.redisson.api.RLock;
|
||||
import org.redisson.api.RedissonClient;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.core.env.Environment;
|
||||
|
|
@ -122,4 +125,11 @@ public class RedisUtil {
|
|||
private static Environment environment() {
|
||||
return (Environment)SpringContextHolder.getBean(Environment.class);
|
||||
}
|
||||
|
||||
public static RLock getLock(String key) {
|
||||
return redissonClient().getLock(key);
|
||||
}
|
||||
private static RedissonClient redissonClient() {
|
||||
return (RedissonClient)SpringContextHolder.getBean(RedissonClient.class);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -55,7 +55,11 @@ public class AppletRecipeV2Controller extends BaseController {
|
|||
}
|
||||
|
||||
}
|
||||
|
||||
/**
|
||||
* @author jsk
|
||||
* @param content
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取预定餐食堂列表")
|
||||
@GetMapping({"/list/reserve/canteen/shopstall"})
|
||||
public TableDataInfo getReserveMealCanteenList(@Valid AppletReserveCanteenDTO content) {
|
||||
|
|
@ -67,10 +71,14 @@ public class AppletRecipeV2Controller extends BaseController {
|
|||
return getDataTable(null);
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @author jsk
|
||||
* @param content
|
||||
* @return
|
||||
*/
|
||||
@ApiOperation("获取预定餐菜谱详情")
|
||||
@GetMapping({"/reserve/recipe/detail"})
|
||||
public TableDataInfo getReserveRecipeDetailList(@Valid AppletReserveRecipeDTO content) {
|
||||
@PostMapping({"/reserve/recipe/detail"})
|
||||
public TableDataInfo getReserveRecipeDetailList(@RequestBody AppletReserveRecipeDTO content) {
|
||||
try {
|
||||
startPage();
|
||||
return getDataTable(this.menuRecipeService.getReserveRecipeDetailList(content));
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ import java.time.LocalDate;
|
|||
@Data
|
||||
public class AppletReserveCanteenDTO {
|
||||
@ApiModelProperty("菜谱日期")
|
||||
private @NotNull(message = "菜谱id不能为空") LocalDate applyDate;
|
||||
private @NotNull(message = "菜谱id不能为空") String applyDate;
|
||||
@ApiModelProperty("人员id")
|
||||
private Long custId;
|
||||
@ApiModelProperty("菜谱id")
|
||||
|
|
|
|||
|
|
@ -9,10 +9,109 @@ import java.time.LocalDate;
|
|||
@Data
|
||||
public class AppletReserveRecipeDTO {
|
||||
@ApiModelProperty("菜谱日期")
|
||||
private @NotNull(message = "菜谱id不能为空") LocalDate applyDate;
|
||||
private @NotNull(
|
||||
message = "{menu_apply_date_null}"
|
||||
) LocalDate applyDate;
|
||||
@ApiModelProperty("菜谱id")
|
||||
private @NotNull(
|
||||
message = "{menu_recipe_id_null}"
|
||||
) Long recipeId;
|
||||
@ApiModelProperty("人员id")
|
||||
private Long custId;
|
||||
@ApiModelProperty("菜谱id")
|
||||
private Long recipeId;
|
||||
|
||||
public LocalDate getApplyDate() {
|
||||
return this.applyDate;
|
||||
}
|
||||
|
||||
public Long getRecipeId() {
|
||||
return this.recipeId;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public void setApplyDate(final LocalDate applyDate) {
|
||||
this.applyDate = applyDate;
|
||||
}
|
||||
|
||||
public void setRecipeId(final Long recipeId) {
|
||||
this.recipeId = recipeId;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof AppletReserveRecipeDTO)) {
|
||||
return false;
|
||||
} else {
|
||||
AppletReserveRecipeDTO other = (AppletReserveRecipeDTO)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
label47: {
|
||||
Object this$recipeId = this.getRecipeId();
|
||||
Object other$recipeId = other.getRecipeId();
|
||||
if (this$recipeId == null) {
|
||||
if (other$recipeId == null) {
|
||||
break label47;
|
||||
}
|
||||
} else if (this$recipeId.equals(other$recipeId)) {
|
||||
break label47;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$custId.equals(other$custId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$applyDate = this.getApplyDate();
|
||||
Object other$applyDate = other.getApplyDate();
|
||||
if (this$applyDate == null) {
|
||||
if (other$applyDate != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$applyDate.equals(other$applyDate)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof AppletReserveRecipeDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $recipeId = this.getRecipeId();
|
||||
result = result * 59 + ($recipeId == null ? 43 : $recipeId.hashCode());
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
Object $applyDate = this.getApplyDate();
|
||||
result = result * 59 + ($applyDate == null ? 43 : $applyDate.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String var10000 = String.valueOf(this.getApplyDate());
|
||||
return "AppletReserveRecipeDTO(applyDate=" + var10000 + ", recipeId=" + this.getRecipeId() + ", custId=" + this.getCustId() + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -143,4 +143,219 @@ public class MenuRecipeDetail {
|
|||
this.uptime = uptime;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof MenuRecipeDetail)) {
|
||||
return false;
|
||||
} else {
|
||||
MenuRecipeDetail other = (MenuRecipeDetail)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
label167: {
|
||||
Object this$id = this.getId();
|
||||
Object other$id = other.getId();
|
||||
if (this$id == null) {
|
||||
if (other$id == null) {
|
||||
break label167;
|
||||
}
|
||||
} else if (this$id.equals(other$id)) {
|
||||
break label167;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$detailId = this.getDetailId();
|
||||
Object other$detailId = other.getDetailId();
|
||||
if (this$detailId == null) {
|
||||
if (other$detailId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$detailId.equals(other$detailId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label153: {
|
||||
Object this$saleTypeId = this.getSaleTypeId();
|
||||
Object other$saleTypeId = other.getSaleTypeId();
|
||||
if (this$saleTypeId == null) {
|
||||
if (other$saleTypeId == null) {
|
||||
break label153;
|
||||
}
|
||||
} else if (this$saleTypeId.equals(other$saleTypeId)) {
|
||||
break label153;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$recipeId = this.getRecipeId();
|
||||
Object other$recipeId = other.getRecipeId();
|
||||
if (this$recipeId == null) {
|
||||
if (other$recipeId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$recipeId.equals(other$recipeId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label139: {
|
||||
Object this$mealtimeType = this.getMealtimeType();
|
||||
Object other$mealtimeType = other.getMealtimeType();
|
||||
if (this$mealtimeType == null) {
|
||||
if (other$mealtimeType == null) {
|
||||
break label139;
|
||||
}
|
||||
} else if (this$mealtimeType.equals(other$mealtimeType)) {
|
||||
break label139;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$detailType = this.getDetailType();
|
||||
Object other$detailType = other.getDetailType();
|
||||
if (this$detailType == null) {
|
||||
if (other$detailType != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$detailType.equals(other$detailType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label125: {
|
||||
Object this$applyWeek = this.getApplyWeek();
|
||||
Object other$applyWeek = other.getApplyWeek();
|
||||
if (this$applyWeek == null) {
|
||||
if (other$applyWeek == null) {
|
||||
break label125;
|
||||
}
|
||||
} else if (this$applyWeek.equals(other$applyWeek)) {
|
||||
break label125;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label118: {
|
||||
Object this$revision = this.getRevision();
|
||||
Object other$revision = other.getRevision();
|
||||
if (this$revision == null) {
|
||||
if (other$revision == null) {
|
||||
break label118;
|
||||
}
|
||||
} else if (this$revision.equals(other$revision)) {
|
||||
break label118;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$applyDate = this.getApplyDate();
|
||||
Object other$applyDate = other.getApplyDate();
|
||||
if (this$applyDate == null) {
|
||||
if (other$applyDate != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$applyDate.equals(other$applyDate)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label104: {
|
||||
Object this$crby = this.getCrby();
|
||||
Object other$crby = other.getCrby();
|
||||
if (this$crby == null) {
|
||||
if (other$crby == null) {
|
||||
break label104;
|
||||
}
|
||||
} else if (this$crby.equals(other$crby)) {
|
||||
break label104;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label97: {
|
||||
Object this$crtime = this.getCrtime();
|
||||
Object other$crtime = other.getCrtime();
|
||||
if (this$crtime == null) {
|
||||
if (other$crtime == null) {
|
||||
break label97;
|
||||
}
|
||||
} else if (this$crtime.equals(other$crtime)) {
|
||||
break label97;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$upby = this.getUpby();
|
||||
Object other$upby = other.getUpby();
|
||||
if (this$upby == null) {
|
||||
if (other$upby != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$upby.equals(other$upby)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$uptime = this.getUptime();
|
||||
Object other$uptime = other.getUptime();
|
||||
if (this$uptime == null) {
|
||||
if (other$uptime != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$uptime.equals(other$uptime)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof MenuRecipeDetail;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $id = this.getId();
|
||||
result = result * 59 + ($id == null ? 43 : $id.hashCode());
|
||||
Object $detailId = this.getDetailId();
|
||||
result = result * 59 + ($detailId == null ? 43 : $detailId.hashCode());
|
||||
Object $saleTypeId = this.getSaleTypeId();
|
||||
result = result * 59 + ($saleTypeId == null ? 43 : $saleTypeId.hashCode());
|
||||
Object $recipeId = this.getRecipeId();
|
||||
result = result * 59 + ($recipeId == null ? 43 : $recipeId.hashCode());
|
||||
Object $mealtimeType = this.getMealtimeType();
|
||||
result = result * 59 + ($mealtimeType == null ? 43 : $mealtimeType.hashCode());
|
||||
Object $detailType = this.getDetailType();
|
||||
result = result * 59 + ($detailType == null ? 43 : $detailType.hashCode());
|
||||
Object $applyWeek = this.getApplyWeek();
|
||||
result = result * 59 + ($applyWeek == null ? 43 : $applyWeek.hashCode());
|
||||
Object $revision = this.getRevision();
|
||||
result = result * 59 + ($revision == null ? 43 : $revision.hashCode());
|
||||
Object $applyDate = this.getApplyDate();
|
||||
result = result * 59 + ($applyDate == null ? 43 : $applyDate.hashCode());
|
||||
Object $crby = this.getCrby();
|
||||
result = result * 59 + ($crby == null ? 43 : $crby.hashCode());
|
||||
Object $crtime = this.getCrtime();
|
||||
result = result * 59 + ($crtime == null ? 43 : $crtime.hashCode());
|
||||
Object $upby = this.getUpby();
|
||||
result = result * 59 + ($upby == null ? 43 : $upby.hashCode());
|
||||
Object $uptime = this.getUptime();
|
||||
result = result * 59 + ($uptime == null ? 43 : $uptime.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Long var10000 = this.getId();
|
||||
return "MenuRecipeDetail(id=" + var10000 + ", detailId=" + this.getDetailId() + ", saleTypeId=" + this.getSaleTypeId() + ", recipeId=" + this.getRecipeId() + ", applyDate=" + String.valueOf(this.getApplyDate()) + ", mealtimeType=" + this.getMealtimeType() + ", detailType=" + this.getDetailType() + ", applyWeek=" + this.getApplyWeek() + ", revision=" + this.getRevision() + ", crby=" + this.getCrby() + ", crtime=" + String.valueOf(this.getCrtime()) + ", upby=" + this.getUpby() + ", uptime=" + String.valueOf(this.getUptime()) + ")";
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
package com.bonus.core.menu.service.impl;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollUtil;
|
||||
import cn.hutool.core.util.ObjectUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.core.toolkit.support.SFunction;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.bonus.common.core.exception.ServiceException;
|
||||
import com.bonus.constant.DelFlagEnum;
|
||||
|
|
@ -220,6 +222,7 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
|
||||
@Override
|
||||
public List<AppletReserveRecipeVO> getReserveRecipeDetailList(AppletReserveRecipeDTO content) {
|
||||
this.generateRecipe(content.getRecipeId(), content.getApplyDate());
|
||||
List<AppletReserveRecipeVO> resultList = ((MenuRecipeMapper)this.baseMapper).selectReserveRecipe(content.getApplyDate(), content.getRecipeId());
|
||||
if (ObjectUtil.isEmpty(resultList)) {
|
||||
return resultList;
|
||||
|
|
@ -227,7 +230,7 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
resultList.sort(Collections.reverseOrder((s1, s2) -> {
|
||||
return s2.getMealtimeType() - s1.getMealtimeType();
|
||||
}));
|
||||
Long stallId = ((MenuRecipeMapper)this.baseMapper).selectStallIdByWrappers((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MenuRecipe.class).eq(MenuRecipe::getRecipeId, content.getRecipeId())));
|
||||
Long stallId = ((MenuRecipeMapper)this.baseMapper).selectStallIdByWrappers(Wrappers.lambdaQuery(MenuRecipe.class).eq(MenuRecipe::getRecipeId, content.getRecipeId()).eq(MenuRecipe::getDelFlag, DelFlagEnum.DEL_FALSE.key()));
|
||||
List<AllocDeliveryCostModel> costModelList = this.allocDeliveryApi.queryDeliveryCostModel(stallId);
|
||||
log.info("配置api查询的档口配送,档口id: {}, 配置: {}", stallId, JSON.toJSONString(costModelList));
|
||||
List<AllocMealtimeStateModel> mealTimeList = this.allocMealtimeApi.getAllocMealtimeMenuModel(stallId).getMealtimeStateModelList();
|
||||
|
|
@ -347,40 +350,34 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
public void generateRecipe(Long recipeId, LocalDate applyDate) {
|
||||
if (!ObjectUtil.isEmpty(recipeId) && !ObjectUtil.isEmpty(applyDate)) {
|
||||
this.generateRecipe(Collections.singletonList(recipeId), applyDate);
|
||||
}
|
||||
}
|
||||
@Transactional(rollbackFor = {Exception.class})
|
||||
public synchronized void generateRecipe(List<Long> recipeIdList, LocalDate applyDate) {
|
||||
if (!ObjectUtil.isEmpty(recipeIdList) && !ObjectUtil.isEmpty(applyDate)) {
|
||||
// List<Long> recipeIdList = new ArrayList(recipeIdList);
|
||||
Map<Long, Long> recipeDetailContMap = this.menuRecipeDetailService.list(Wrappers.lambdaQuery(MenuRecipeDetail.class)
|
||||
.select(MenuRecipeDetail::getRecipeId)
|
||||
.eq(MenuRecipeDetail::getApplyDate, applyDate)
|
||||
.in(MenuRecipeDetail::getRecipeId, recipeIdList))
|
||||
.stream()
|
||||
.collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId, Collectors.counting()));
|
||||
recipeIdList = new ArrayList(recipeIdList);
|
||||
Map<Long, Long> recipeDetailContMap = (Map)this.menuRecipeDetailService.list((Wrapper<MenuRecipeDetail>)((LambdaQueryWrapper<MenuRecipeDetail>)Wrappers.lambdaQuery(MenuRecipeDetail.class).select(MenuRecipeDetail::getRecipeId).eq(MenuRecipeDetail::getApplyDate, applyDate)).in(MenuRecipeDetail::getRecipeId, recipeIdList)).stream().collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId, Collectors.counting()));
|
||||
recipeIdList.removeAll(recipeDetailContMap.keySet());
|
||||
if (!ObjectUtil.isEmpty(recipeIdList)) {
|
||||
List<MenuRecipe> menuRecipes = this.list(Wrappers.<MenuRecipe>lambdaQuery()
|
||||
.in(MenuRecipe::getRecipeType, Arrays.asList(2, 3))
|
||||
.in(MenuRecipe::getRecipeId, recipeIdList));
|
||||
List<MenuRecipe> menuRecipes = this.list((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MenuRecipe.class).in(MenuRecipe::getRecipeType, new Object[]{2, 3})).apply(CollUtil.isNotEmpty(recipeIdList),"recipe_id IN (" + recipeIdList.stream().map(String::valueOf).collect(Collectors.joining(", ")) + ")"));
|
||||
if (!ObjectUtil.isEmpty(menuRecipes)) {
|
||||
Map<Long, MenuRecipe> recipeMap = (Map) menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, Function.identity()));
|
||||
List<MenuRecipeDetail> menuRecipeDetails =
|
||||
this.menuRecipeDetailService.list(Wrappers.<MenuRecipeDetail>lambdaQuery()
|
||||
.eq(MenuRecipeDetail::getDetailType, 1).in(MenuRecipeDetail::getRecipeId, recipeIdList));
|
||||
Map<Long, Integer> recipeTypeMap = (Map) menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, MenuRecipe::getRecipeType));
|
||||
Map<Long, MenuRecipe> recipeMap = (Map)menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, Function.identity()));
|
||||
List<MenuRecipeDetail> menuRecipeDetails = this.menuRecipeDetailService.list((Wrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(MenuRecipeDetail.class).eq(MenuRecipeDetail::getDetailType, 1)).apply(CollUtil.isNotEmpty(recipeIdList),"recipe_id IN (" + recipeIdList.stream().map(String::valueOf).collect(Collectors.joining(", ")) + ")"));
|
||||
Map<Long, Integer> recipeTypeMap = (Map)menuRecipes.stream().collect(Collectors.toMap(MenuRecipe::getRecipeId, MenuRecipe::getRecipeType));
|
||||
menuRecipeDetails = this.filterMenuRecipeDetails(recipeTypeMap, menuRecipeDetails, applyDate);
|
||||
if (!ObjectUtil.isEmpty(menuRecipeDetails)) {
|
||||
Map<Long, List<MenuRecipeDetail>> detailMap = (Map) menuRecipeDetails.stream().collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId));
|
||||
List<Long> detailIds = (List) menuRecipeDetails.stream().map(MenuRecipeDetail::getDetailId).collect(Collectors.toList());
|
||||
Map<Long, List<MenuRecipeDishes>> recipeDishes = (Map) this.menuRecipeDishesService.list((Wrapper) Wrappers.lambdaQuery(MenuRecipeDishes.class)
|
||||
.in(MenuRecipeDishes::getDetailId, detailIds)).stream().collect(Collectors.groupingBy(MenuRecipeDishes::getDetailId));
|
||||
Map<Long, List<MenuRecipeDetail>> detailMap = (Map)menuRecipeDetails.stream().collect(Collectors.groupingBy(MenuRecipeDetail::getRecipeId));
|
||||
List<Long> detailIds = (List)menuRecipeDetails.stream().map(MenuRecipeDetail::getDetailId).collect(Collectors.toList());
|
||||
Map<Long, List<MenuRecipeDishes>> recipeDishes = (Map)this.menuRecipeDishesService.list((Wrapper)Wrappers.lambdaQuery(MenuRecipeDishes.class).in(MenuRecipeDishes::getDetailId, detailIds)).stream().collect(Collectors.groupingBy(MenuRecipeDishes::getDetailId));
|
||||
List<MenuRecipeDetail> recipeDetailV2List = Lists.newArrayList();
|
||||
List<MenuRecipeDishes> recipeDishesV2List = Lists.newArrayList();
|
||||
Iterator var13 = recipeMap.keySet().iterator();
|
||||
|
||||
label59:
|
||||
while (true) {
|
||||
while(true) {
|
||||
Long recipeId;
|
||||
Integer type;
|
||||
List menuRecipeDetail;
|
||||
|
|
@ -390,26 +387,21 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
if (ObjectUtil.isNotEmpty(recipeDishesV2List)) {
|
||||
this.menuRecipeDishesService.saveBatch(recipeDishesV2List);
|
||||
}
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
recipeId = (Long) var13.next();
|
||||
type = (Integer) recipeTypeMap.get(recipeId);
|
||||
menuRecipeDetail = (List) detailMap.get(recipeId);
|
||||
} while (!ObjectUtil.isNotEmpty(menuRecipeDetail));
|
||||
|
||||
recipeId = (Long)var13.next();
|
||||
type = (Integer)recipeTypeMap.get(recipeId);
|
||||
menuRecipeDetail = (List)detailMap.get(recipeId);
|
||||
} while(!ObjectUtil.isNotEmpty(menuRecipeDetail));
|
||||
Iterator var17 = menuRecipeDetail.iterator();
|
||||
|
||||
while (true) {
|
||||
while(true) {
|
||||
Long detailId;
|
||||
List dishes;
|
||||
do {
|
||||
if (!var17.hasNext()) {
|
||||
continue label59;
|
||||
}
|
||||
|
||||
MenuRecipeDetail recipeDetail = (MenuRecipeDetail) var17.next();
|
||||
MenuRecipeDetail recipeDetail = (MenuRecipeDetail)var17.next();
|
||||
MenuRecipeDetail detailItem = new MenuRecipeDetail();
|
||||
detailId = Id.next();
|
||||
detailItem.setDetailId(detailId);
|
||||
|
|
@ -417,22 +409,19 @@ public class MenuRecipeServiceImpl extends ServiceImpl<MenuRecipeMapper, MenuRec
|
|||
if (ObjectUtil.equal(type, 3)) {
|
||||
detailItem.setApplyWeek(applyDate.getDayOfWeek().getValue());
|
||||
}
|
||||
|
||||
detailItem.setApplyDate(applyDate);
|
||||
detailItem.setMealtimeType(recipeDetail.getMealtimeType());
|
||||
detailItem.setCrby("");
|
||||
detailItem.setDetailType(2);
|
||||
recipeDetailV2List.add(detailItem);
|
||||
dishes = (List) recipeDishes.get(recipeDetail.getDetailId());
|
||||
} while (!ObjectUtil.isNotEmpty(dishes));
|
||||
|
||||
dishes = (List)recipeDishes.get(recipeDetail.getDetailId());
|
||||
} while(!ObjectUtil.isNotEmpty(dishes));
|
||||
Iterator var22 = dishes.iterator();
|
||||
|
||||
while (var22.hasNext()) {
|
||||
MenuRecipeDishes dish = (MenuRecipeDishes) var22.next();
|
||||
MenuRecipeDishes dishesItem = (MenuRecipeDishes) BeanUtil.copyProperties(dish, MenuRecipeDishes.class, new String[0]);
|
||||
while(var22.hasNext()) {
|
||||
MenuRecipeDishes dish = (MenuRecipeDishes)var22.next();
|
||||
MenuRecipeDishes dishesItem = (MenuRecipeDishes)BeanUtil.copyProperties(dish, MenuRecipeDishes.class, new String[0]);
|
||||
dishesItem.setDetailId(detailId);
|
||||
dishesItem.setId((Long) null);
|
||||
dishesItem.setId((Long)null);
|
||||
recipeDishesV2List.add(dishesItem);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,95 @@
|
|||
package com.bonus.core.order.common.constants;
|
||||
|
||||
|
||||
import com.bonus.core.common.utils.TenantContextHolder;
|
||||
|
||||
public class OrderCacheConstants {
|
||||
public static final Long TWENTY_FOUR_HOURS = 86400L;
|
||||
public static final Integer TWO_SECONDS = 2;
|
||||
public static final Integer MOBILE_PAY_INTERVAL = 3;
|
||||
public static final Long INVENTORY_CACHE_SECONDS = 3600L;
|
||||
public static final Long WEIGHT_CACHE_SECONDS = 14400L;
|
||||
public static final Long CALL_CACHE_SECONDS = 300L;
|
||||
|
||||
public static String getOrderAmountChangeKey(Long tradeId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:amount:change:" + tradeId;
|
||||
}
|
||||
|
||||
public static String mobileShopInventoryLockKey(Long supermarketId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:mobileShopInventoryLock:" + supermarketId;
|
||||
}
|
||||
|
||||
public static String mobileShopInventoryCacheKey(Long orderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:mobileShopInventoryCache:" + orderId;
|
||||
}
|
||||
|
||||
public static String orderSubmitRepeatKey(String repeatedId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:repeated:" + repeatedId;
|
||||
}
|
||||
|
||||
public static String orderHandleLockKey(String lockId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:handle:" + lockId;
|
||||
}
|
||||
|
||||
public static String weightOrderHandleLockKey(String lockId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:weight-handle:" + lockId;
|
||||
}
|
||||
|
||||
public static String orderCacheKey(String macOrderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:weight:" + macOrderId;
|
||||
}
|
||||
|
||||
public static String orderCacheSaveLockKey(String macOrderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:weight-save:" + macOrderId;
|
||||
}
|
||||
|
||||
public static String orderAsyncPayResultLockKey(String macOrderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:async-pay-result:" + macOrderId;
|
||||
}
|
||||
|
||||
public static String payQueryKey(Long tradeId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:pay-query:" + tradeId;
|
||||
}
|
||||
|
||||
public static String payQueryTimesKey(Long tradeId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:pay-query-times:" + tradeId;
|
||||
}
|
||||
|
||||
public static String orderCallHandleLockKey(Long orderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:call-handle:" + orderId;
|
||||
}
|
||||
|
||||
public static String orderMakingPartCompleteCacheKey(Long orderId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:making-part-complete:" + orderId;
|
||||
}
|
||||
|
||||
public static String orderCallCacheKey(Long stallId, Integer mealtimeType) {
|
||||
return "yst:" + TenantContextHolder.getTenantId() + ":order:call:" + stallId + ":" + mealtimeType;
|
||||
}
|
||||
|
||||
public static String orderCallCacheLockKey(Long stallId, Integer mealtimeType) {
|
||||
return "yst:" + TenantContextHolder.getTenantId() + ":order:call-lock:" + stallId + ":" + mealtimeType;
|
||||
}
|
||||
|
||||
public static String shoppingCartLockKey(Long custId) {
|
||||
Long var10000 = TenantContextHolder.getTenantId();
|
||||
return "yst:" + var10000 + ":order:shopping-cart:" + custId;
|
||||
}
|
||||
|
||||
public static String orderExportLockKey() {
|
||||
return "yst:" + TenantContextHolder.getTenantId() + ":order:export-lock";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,54 @@
|
|||
package com.bonus.core.order.common.constants;
|
||||
|
||||
|
||||
import com.bonus.core.common.enums.AllocMealtimeTypeEnum;
|
||||
import com.bonus.i18n.I18n;
|
||||
|
||||
import java.time.LocalTime;
|
||||
|
||||
public class OrderTips {
|
||||
private OrderTips() {
|
||||
throw new IllegalStateException("Utility class");
|
||||
}
|
||||
|
||||
public static String noOrder() {
|
||||
return I18n.getMessage("order.no-order", new Object[0]);
|
||||
}
|
||||
|
||||
public static String orderStateWrong(Integer orderState) {
|
||||
return I18n.getMessage("order.wrong-order-state", new Object[]{OrderStateEnum.getDesc(orderState)});
|
||||
}
|
||||
|
||||
public static String correctOrderStateWrong(Integer orderState) {
|
||||
return I18n.getMessage("order.buffet.correct-pay-state-wrong", new Object[]{OrderStateEnum.getDesc(orderState)});
|
||||
}
|
||||
|
||||
public static String refundLackDetail() {
|
||||
return I18n.getMessage("order.refund.lack-detail", new Object[0]);
|
||||
}
|
||||
|
||||
public static String refundDetailNotExists() {
|
||||
return I18n.getMessage("order.refund.detail-not-exists", new Object[0]);
|
||||
}
|
||||
|
||||
public static String refundOutOfTime(String deadLineTime) {
|
||||
return I18n.getMessage("order.refund.out-of-time", new Object[]{deadLineTime});
|
||||
}
|
||||
|
||||
public static String refundFailedOfTime(Integer mealtimeType, LocalTime deadLineTime) {
|
||||
return I18n.getMessage("order.refund.failed-by-time", new Object[]{AllocMealtimeTypeEnum.getDescByKey(mealtimeType), deadLineTime});
|
||||
}
|
||||
|
||||
public static String mobileNoDelivery() {
|
||||
return I18n.getMessage("order.mobile.no-delivery", new Object[0]);
|
||||
}
|
||||
|
||||
public static String stallInRest(String stallName) {
|
||||
return I18n.getMessage("alloc_stall_is_rest", new Object[]{stallName});
|
||||
}
|
||||
|
||||
public static String paramIllegal(String paramName) {
|
||||
String var10000 = I18n.getMessage("order.param-illegal", new Object[0]);
|
||||
return var10000 + paramName;
|
||||
}
|
||||
}
|
||||
|
|
@ -4,9 +4,19 @@ package com.bonus.core.order.common.service;
|
|||
import com.bonus.core.order.common.model.OrderShoppingCart;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingSearchDTO;
|
||||
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
|
||||
public interface OrderShoppingCartService {
|
||||
List<OrderShoppingCart> listByCust(OrderShoppingSearchDTO param);
|
||||
|
||||
void plusQuantity(Long shoppingCartId, Integer quantity);
|
||||
|
||||
void insert(OrderShoppingCart entity) ;
|
||||
|
||||
void updateQuantity(Long shoppingCartId, Integer quantity);
|
||||
|
||||
void removeByIds(Collection<Long> shoppingCartIds);
|
||||
|
||||
void removeByCust(Long custId, Integer orderType, List<Long> canteenId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,7 +4,6 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import com.baomidou.mybatisplus.core.conditions.Wrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.bonus.core.order.common.mapper.OrderShoppingCartMapper;
|
||||
import com.bonus.core.order.common.model.OrderShoppingCart;
|
||||
import com.bonus.core.order.common.service.OrderShoppingCartService;
|
||||
|
|
@ -13,10 +12,11 @@ import com.bonus.core.order.utils.LeNumUtil;
|
|||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
|
||||
import java.lang.invoke.SerializedLambda;
|
||||
import java.util.Collection;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
public class OrderShoppingCartServiceImpl implements OrderShoppingCartService {
|
||||
|
|
@ -28,8 +28,39 @@ public class OrderShoppingCartServiceImpl implements OrderShoppingCartService {
|
|||
|
||||
@Override
|
||||
public List<OrderShoppingCart> listByCust(OrderShoppingSearchDTO param) {
|
||||
//jsk
|
||||
return this.baseMapper.selectList((Wrapper)((LambdaQueryWrapper)((LambdaQueryWrapper)((LambdaQueryWrapper)((LambdaQueryWrapper)Wrappers.lambdaQuery(OrderShoppingCart.class).eq(OrderShoppingCart::getCustId, param.getCustId())).eq(LeNumUtil.isValidId(param.getOrderType()), 2, param.getOrderType())).eq(CollUtil.isNotEmpty(param.getCanteenIdList()), 1, param.getCanteenIdList())).eq(LeNumUtil.isValidId(param.getStallId()), 1, param.getStallId())).orderByAsc(3));
|
||||
return this.baseMapper.selectList(((LambdaQueryWrapper<OrderShoppingCart>)((LambdaQueryWrapper) Wrappers
|
||||
.lambdaQuery(OrderShoppingCart.class).eq(OrderShoppingCart::getCustId, param.getCustId())
|
||||
.eq(LeNumUtil.isValidId(param.getOrderType()), OrderShoppingCart::getOrderType, param.getOrderType()))
|
||||
.apply(CollUtil.isNotEmpty(param.getCanteenIdList()),"canteen_id IN (" + param.getCanteenIdList().stream().map(String::valueOf).collect(Collectors.joining(", ")) + ")"))
|
||||
.eq(LeNumUtil.isValidId(param.getStallId()), OrderShoppingCart::getStallId, param.getStallId()).orderByAsc(OrderShoppingCart::getShoppingCartId));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void plusQuantity(Long shoppingCartId, Integer quantity) {
|
||||
this.baseMapper.update(null, (Wrapper)((LambdaUpdateWrapper)Wrappers.lambdaUpdate(OrderShoppingCart.class).eq(OrderShoppingCart::getShoppingCartId, shoppingCartId)).setSql("quantity = quantity + " + quantity, new Object[0]));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void insert(OrderShoppingCart entity) {
|
||||
this.baseMapper.insert(entity);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateQuantity(Long shoppingCartId, Integer quantity) {
|
||||
this.baseMapper.update(null, Wrappers.lambdaUpdate(OrderShoppingCart.class).eq(OrderShoppingCart::getShoppingCartId, shoppingCartId).set(OrderShoppingCart::getQuantity, quantity));
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeByIds(Collection<Long> shoppingCartIds) {
|
||||
if (!CollUtil.isEmpty(shoppingCartIds)) {
|
||||
this.baseMapper.deleteBatchIds(shoppingCartIds);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void removeByCust(Long custId, Integer orderType, List<Long> canteenId) {
|
||||
if (LeNumUtil.isValidId(custId)) {
|
||||
this.baseMapper.delete(Wrappers.lambdaQuery(OrderShoppingCart.class).eq(OrderShoppingCart::getCustId, custId).in(CollUtil.isNotEmpty(canteenId), OrderShoppingCart::getCanteenId, canteenId).eq(LeNumUtil.isValidId(orderType), OrderShoppingCart::getOrderType, orderType));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -4,9 +4,12 @@ import cn.hutool.core.collection.CollUtil;
|
|||
import com.bonus.core.common.custom.business.CustomBusiness;
|
||||
import com.bonus.core.common.page.PageVO;
|
||||
import com.bonus.core.order.mobile.dto.OrderListMobileDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartAddDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartUpdateDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingSearchDTO;
|
||||
import com.bonus.core.order.mobile.vo.OrderInfoMobileVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderListMobileVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartAddResultVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartListMobileVO;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
|
|
@ -70,27 +73,27 @@ public class OrderCustomMobileBusiness implements CustomBusiness {
|
|||
return resultList;
|
||||
}
|
||||
//
|
||||
// public OrderShoppingCartAddResultVO willAddShoppingCart(OrderShoppingCartAddDTO addDTO) {
|
||||
// return null;
|
||||
// }
|
||||
public OrderShoppingCartAddResultVO willAddShoppingCart(OrderShoppingCartAddDTO addDTO) {
|
||||
return null;
|
||||
}
|
||||
//
|
||||
// public OrderShoppingCartAddResultVO didAddShoppingCart(OrderShoppingCartAddDTO addDTO, OrderShoppingCartAddResultVO resultVO) {
|
||||
// return resultVO;
|
||||
// }
|
||||
public OrderShoppingCartAddResultVO didAddShoppingCart(OrderShoppingCartAddDTO addDTO, OrderShoppingCartAddResultVO resultVO) {
|
||||
return resultVO;
|
||||
}
|
||||
//
|
||||
// public boolean willUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
|
||||
// return true;
|
||||
// }
|
||||
public boolean willUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
|
||||
return true;
|
||||
}
|
||||
//
|
||||
// public void didUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
|
||||
// }
|
||||
public void didUpdateShoppingCart(OrderShoppingCartUpdateDTO updateDTO) {
|
||||
}
|
||||
//
|
||||
// public boolean willClearShoppingCart(Collection<Long> shoppingCartIds) {
|
||||
// return true;
|
||||
// }
|
||||
public boolean willClearShoppingCart(Collection<Long> shoppingCartIds) {
|
||||
return true;
|
||||
}
|
||||
//
|
||||
// public void didClearShoppingCart(Collection<Long> shoppingCartIds) {
|
||||
// }
|
||||
public void didClearShoppingCart(Collection<Long> shoppingCartIds) {
|
||||
}
|
||||
//
|
||||
// public List<OrderDetailPayDTO> willFilterInvalidByCartIds(Integer orderType, Long custId, List<OrderDetailPayDTO> orderDetailPayDTOList) {
|
||||
// return null;
|
||||
|
|
|
|||
|
|
@ -5,13 +5,12 @@ import com.bonus.common.core.web.controller.BaseController;
|
|||
import com.bonus.core.common.page.PageVO;
|
||||
import com.bonus.core.common.utils.JavaxValidateUtils;
|
||||
import com.bonus.core.order.common.dto.RequestHeaderDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderIdMobileDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderListMobileDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingSearchDTO;
|
||||
import com.bonus.core.order.mobile.dto.*;
|
||||
import com.bonus.core.order.mobile.service.OrderInfoMobileBusiness;
|
||||
import com.bonus.core.order.mobile.service.ShoppingCartBusiness;
|
||||
import com.bonus.core.order.mobile.vo.OrderInfoMobileVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderListMobileVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartAddResultVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartListMobileVO;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
|
|
@ -139,26 +138,23 @@ public class OrderInfoMobileController extends BaseController {
|
|||
// return LeResponse.succ(preBookExists ? LeConstants.COMMON_YES : LeConstants.COMMON_NO);
|
||||
// }
|
||||
//
|
||||
// @PostMapping({"/shopping-cart/add"})
|
||||
// public LeResponse<OrderShoppingCartAddResultVO> addShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody LeRequest<OrderShoppingCartAddDTO> request) {
|
||||
// ((OrderShoppingCartAddDTO)request.getContent()).setCustId(HeaderFetchUtil.getCustId(headers));
|
||||
// OrderShoppingCartAddResultVO result = this.shoppingCartBusiness.add((OrderShoppingCartAddDTO)request.getContent());
|
||||
// return LeResponse.succ(result);
|
||||
// }
|
||||
@PostMapping({"/shopping-cart/add"})
|
||||
public R<OrderShoppingCartAddResultVO> addShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody OrderShoppingCartAddDTO request) {
|
||||
OrderShoppingCartAddResultVO result = this.shoppingCartBusiness.add(request);
|
||||
return R.ok(result);
|
||||
}
|
||||
//
|
||||
// @PostMapping({"/shopping-cart/update"})
|
||||
// public LeResponse<Object> updateShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody LeRequest<OrderShoppingCartUpdateDTO> request) {
|
||||
// ((OrderShoppingCartUpdateDTO)request.getContent()).setCustId(HeaderFetchUtil.getCustId(headers));
|
||||
// this.shoppingCartBusiness.update((OrderShoppingCartUpdateDTO)request.getContent());
|
||||
// return LeResponse.succ();
|
||||
// }
|
||||
//
|
||||
// @PostMapping({"/shopping-cart/clear"})
|
||||
// public LeResponse<Object> removeShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody LeRequest<OrderShoppingCartClearDTO> request) {
|
||||
// ((OrderShoppingCartClearDTO)request.getContent()).setCustId(HeaderFetchUtil.getCustId(headers));
|
||||
// this.shoppingCartBusiness.clear((OrderShoppingCartClearDTO)request.getContent());
|
||||
// return LeResponse.succ();
|
||||
// }
|
||||
@PostMapping({"/shopping-cart/update"})
|
||||
public R<Object> updateShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody OrderShoppingCartUpdateDTO request) {
|
||||
this.shoppingCartBusiness.update(request);
|
||||
return R.ok();
|
||||
}
|
||||
|
||||
@PostMapping({"/shopping-cart/clear"})
|
||||
public R<Object> removeShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody OrderShoppingCartClearDTO request) {
|
||||
this.shoppingCartBusiness.clear(request);
|
||||
return R.ok();
|
||||
}
|
||||
//
|
||||
@PostMapping({"/shopping-cart/list-cust"})
|
||||
@ApiOperation(
|
||||
|
|
@ -166,9 +162,7 @@ public class OrderInfoMobileController extends BaseController {
|
|||
)
|
||||
public R<List<OrderShoppingCartListMobileVO>> listCustShoppingCart(@RequestHeader Map<String, String> headers, @RequestBody OrderShoppingSearchDTO request) {
|
||||
RequestHeaderDTO headerDTO = RequestHeaderDTO.of(headers);
|
||||
OrderShoppingSearchDTO vo=new OrderShoppingSearchDTO();
|
||||
vo.setCustId(headerDTO.getCustId());
|
||||
return R.ok(this.shoppingCartBusiness.listByCust(vo));
|
||||
return R.ok(this.shoppingCartBusiness.listByCust(request));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,342 @@
|
|||
package com.bonus.core.order.mobile.dto;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.bonus.core.order.common.model.OrderShoppingCart;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
import javax.validation.constraints.NotEmpty;
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class OrderShoppingCartAddDTO {
|
||||
@ApiModelProperty(
|
||||
value = "人员id",
|
||||
hidden = true
|
||||
)
|
||||
private Long custId;
|
||||
@ApiModelProperty("菜谱id")
|
||||
private Long menuId;
|
||||
@ApiModelProperty("商品/菜品id")
|
||||
private @NotNull
|
||||
Long goodsDishesId;
|
||||
@ApiModelProperty("食堂/超市id")
|
||||
private Long canteenId;
|
||||
@ApiModelProperty("档口id")
|
||||
private Long stallId;
|
||||
@ApiModelProperty("商品/菜品名称")
|
||||
private @NotNull @NotEmpty String goodsDishesName;
|
||||
@ApiModelProperty("订单类型")
|
||||
private @NotNull Integer orderType;
|
||||
@ApiModelProperty("明细类型")
|
||||
private @NotNull Integer detailType;
|
||||
@ApiModelProperty("数量/重量")
|
||||
private @NotNull @Min(1L) Integer quantity;
|
||||
@ApiModelProperty("订单日期")
|
||||
private LocalDate orderDate;
|
||||
@ApiModelProperty("餐次")
|
||||
private Integer mealtimeType;
|
||||
private JsonNode extParam;
|
||||
|
||||
public OrderShoppingCart convertToEntity() {
|
||||
OrderShoppingCart entity = (OrderShoppingCart)BeanUtil.copyProperties(this, OrderShoppingCart.class, new String[0]);
|
||||
return entity;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public Long getMenuId() {
|
||||
return this.menuId;
|
||||
}
|
||||
|
||||
public Long getGoodsDishesId() {
|
||||
return this.goodsDishesId;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return this.canteenId;
|
||||
}
|
||||
|
||||
public Long getStallId() {
|
||||
return this.stallId;
|
||||
}
|
||||
|
||||
public String getGoodsDishesName() {
|
||||
return this.goodsDishesName;
|
||||
}
|
||||
|
||||
public Integer getOrderType() {
|
||||
return this.orderType;
|
||||
}
|
||||
|
||||
public Integer getDetailType() {
|
||||
return this.detailType;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return this.quantity;
|
||||
}
|
||||
|
||||
public LocalDate getOrderDate() {
|
||||
return this.orderDate;
|
||||
}
|
||||
|
||||
public Integer getMealtimeType() {
|
||||
return this.mealtimeType;
|
||||
}
|
||||
|
||||
public JsonNode getExtParam() {
|
||||
return this.extParam;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public void setMenuId(final Long menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public void setGoodsDishesId(final Long goodsDishesId) {
|
||||
this.goodsDishesId = goodsDishesId;
|
||||
}
|
||||
|
||||
public void setCanteenId(final Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public void setStallId(final Long stallId) {
|
||||
this.stallId = stallId;
|
||||
}
|
||||
|
||||
public void setGoodsDishesName(final String goodsDishesName) {
|
||||
this.goodsDishesName = goodsDishesName;
|
||||
}
|
||||
|
||||
public void setOrderType(final Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public void setDetailType(final Integer detailType) {
|
||||
this.detailType = detailType;
|
||||
}
|
||||
|
||||
public void setQuantity(final Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public void setOrderDate(final LocalDate orderDate) {
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public void setMealtimeType(final Integer mealtimeType) {
|
||||
this.mealtimeType = mealtimeType;
|
||||
}
|
||||
|
||||
public void setExtParam(final JsonNode extParam) {
|
||||
this.extParam = extParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof OrderShoppingCartAddDTO)) {
|
||||
return false;
|
||||
} else {
|
||||
OrderShoppingCartAddDTO other = (OrderShoppingCartAddDTO)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
label155: {
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId == null) {
|
||||
break label155;
|
||||
}
|
||||
} else if (this$custId.equals(other$custId)) {
|
||||
break label155;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$menuId = this.getMenuId();
|
||||
Object other$menuId = other.getMenuId();
|
||||
if (this$menuId == null) {
|
||||
if (other$menuId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$menuId.equals(other$menuId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$goodsDishesId = this.getGoodsDishesId();
|
||||
Object other$goodsDishesId = other.getGoodsDishesId();
|
||||
if (this$goodsDishesId == null) {
|
||||
if (other$goodsDishesId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$goodsDishesId.equals(other$goodsDishesId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label134: {
|
||||
Object this$canteenId = this.getCanteenId();
|
||||
Object other$canteenId = other.getCanteenId();
|
||||
if (this$canteenId == null) {
|
||||
if (other$canteenId == null) {
|
||||
break label134;
|
||||
}
|
||||
} else if (this$canteenId.equals(other$canteenId)) {
|
||||
break label134;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label127: {
|
||||
Object this$stallId = this.getStallId();
|
||||
Object other$stallId = other.getStallId();
|
||||
if (this$stallId == null) {
|
||||
if (other$stallId == null) {
|
||||
break label127;
|
||||
}
|
||||
} else if (this$stallId.equals(other$stallId)) {
|
||||
break label127;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label120: {
|
||||
Object this$orderType = this.getOrderType();
|
||||
Object other$orderType = other.getOrderType();
|
||||
if (this$orderType == null) {
|
||||
if (other$orderType == null) {
|
||||
break label120;
|
||||
}
|
||||
} else if (this$orderType.equals(other$orderType)) {
|
||||
break label120;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$detailType = this.getDetailType();
|
||||
Object other$detailType = other.getDetailType();
|
||||
if (this$detailType == null) {
|
||||
if (other$detailType != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$detailType.equals(other$detailType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label106: {
|
||||
Object this$quantity = this.getQuantity();
|
||||
Object other$quantity = other.getQuantity();
|
||||
if (this$quantity == null) {
|
||||
if (other$quantity == null) {
|
||||
break label106;
|
||||
}
|
||||
} else if (this$quantity.equals(other$quantity)) {
|
||||
break label106;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$mealtimeType = this.getMealtimeType();
|
||||
Object other$mealtimeType = other.getMealtimeType();
|
||||
if (this$mealtimeType == null) {
|
||||
if (other$mealtimeType != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$mealtimeType.equals(other$mealtimeType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label92: {
|
||||
Object this$goodsDishesName = this.getGoodsDishesName();
|
||||
Object other$goodsDishesName = other.getGoodsDishesName();
|
||||
if (this$goodsDishesName == null) {
|
||||
if (other$goodsDishesName == null) {
|
||||
break label92;
|
||||
}
|
||||
} else if (this$goodsDishesName.equals(other$goodsDishesName)) {
|
||||
break label92;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$orderDate = this.getOrderDate();
|
||||
Object other$orderDate = other.getOrderDate();
|
||||
if (this$orderDate == null) {
|
||||
if (other$orderDate != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$orderDate.equals(other$orderDate)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$extParam = this.getExtParam();
|
||||
Object other$extParam = other.getExtParam();
|
||||
if (this$extParam == null) {
|
||||
if (other$extParam != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$extParam.equals(other$extParam)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof OrderShoppingCartAddDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
Object $menuId = this.getMenuId();
|
||||
result = result * 59 + ($menuId == null ? 43 : $menuId.hashCode());
|
||||
Object $goodsDishesId = this.getGoodsDishesId();
|
||||
result = result * 59 + ($goodsDishesId == null ? 43 : $goodsDishesId.hashCode());
|
||||
Object $canteenId = this.getCanteenId();
|
||||
result = result * 59 + ($canteenId == null ? 43 : $canteenId.hashCode());
|
||||
Object $stallId = this.getStallId();
|
||||
result = result * 59 + ($stallId == null ? 43 : $stallId.hashCode());
|
||||
Object $orderType = this.getOrderType();
|
||||
result = result * 59 + ($orderType == null ? 43 : $orderType.hashCode());
|
||||
Object $detailType = this.getDetailType();
|
||||
result = result * 59 + ($detailType == null ? 43 : $detailType.hashCode());
|
||||
Object $quantity = this.getQuantity();
|
||||
result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
|
||||
Object $mealtimeType = this.getMealtimeType();
|
||||
result = result * 59 + ($mealtimeType == null ? 43 : $mealtimeType.hashCode());
|
||||
Object $goodsDishesName = this.getGoodsDishesName();
|
||||
result = result * 59 + ($goodsDishesName == null ? 43 : $goodsDishesName.hashCode());
|
||||
Object $orderDate = this.getOrderDate();
|
||||
result = result * 59 + ($orderDate == null ? 43 : $orderDate.hashCode());
|
||||
Object $extParam = this.getExtParam();
|
||||
result = result * 59 + ($extParam == null ? 43 : $extParam.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Long var10000 = this.getCustId();
|
||||
return "OrderShoppingCartAddDTO(custId=" + var10000 + ", menuId=" + this.getMenuId() + ", goodsDishesId=" + this.getGoodsDishesId() + ", canteenId=" + this.getCanteenId() + ", stallId=" + this.getStallId() + ", goodsDishesName=" + this.getGoodsDishesName() + ", orderType=" + this.getOrderType() + ", detailType=" + this.getDetailType() + ", quantity=" + this.getQuantity() + ", orderDate=" + String.valueOf(this.getOrderDate()) + ", mealtimeType=" + this.getMealtimeType() + ", extParam=" + String.valueOf(this.getExtParam()) + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,89 @@
|
|||
package com.bonus.core.order.mobile.dto;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public class OrderShoppingCartClearDTO {
|
||||
@ApiModelProperty("购物车id集合")
|
||||
private @NotNull
|
||||
List<Long> shoppingCartIds;
|
||||
@ApiModelProperty(
|
||||
value = "人员id",
|
||||
hidden = true
|
||||
)
|
||||
private @NotNull Long custId;
|
||||
|
||||
public List<Long> getShoppingCartIds() {
|
||||
return this.shoppingCartIds;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public void setShoppingCartIds(final List<Long> shoppingCartIds) {
|
||||
this.shoppingCartIds = shoppingCartIds;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof OrderShoppingCartClearDTO)) {
|
||||
return false;
|
||||
} else {
|
||||
OrderShoppingCartClearDTO other = (OrderShoppingCartClearDTO)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$custId.equals(other$custId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$shoppingCartIds = this.getShoppingCartIds();
|
||||
Object other$shoppingCartIds = other.getShoppingCartIds();
|
||||
if (this$shoppingCartIds == null) {
|
||||
if (other$shoppingCartIds != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$shoppingCartIds.equals(other$shoppingCartIds)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof OrderShoppingCartClearDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
Object $shoppingCartIds = this.getShoppingCartIds();
|
||||
result = result * 59 + ($shoppingCartIds == null ? 43 : $shoppingCartIds.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
String var10000 = String.valueOf(this.getShoppingCartIds());
|
||||
return "OrderShoppingCartClearDTO(shoppingCartIds=" + var10000 + ", custId=" + this.getCustId() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -0,0 +1,115 @@
|
|||
package com.bonus.core.order.mobile.dto;
|
||||
|
||||
import com.sun.istack.internal.NotNull;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
|
||||
import javax.validation.constraints.Min;
|
||||
|
||||
public class OrderShoppingCartUpdateDTO {
|
||||
@ApiModelProperty("购物车id")
|
||||
private @NotNull
|
||||
Long shoppingCartId;
|
||||
@ApiModelProperty("数量/重量")
|
||||
private @NotNull @Min(0L) Integer quantity;
|
||||
@ApiModelProperty(
|
||||
value = "人员id",
|
||||
hidden = true
|
||||
)
|
||||
private @NotNull Long custId;
|
||||
|
||||
public Long getShoppingCartId() {
|
||||
return this.shoppingCartId;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return this.quantity;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public void setShoppingCartId(final Long shoppingCartId) {
|
||||
this.shoppingCartId = shoppingCartId;
|
||||
}
|
||||
|
||||
public void setQuantity(final Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof OrderShoppingCartUpdateDTO)) {
|
||||
return false;
|
||||
} else {
|
||||
OrderShoppingCartUpdateDTO other = (OrderShoppingCartUpdateDTO)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
label47: {
|
||||
Object this$shoppingCartId = this.getShoppingCartId();
|
||||
Object other$shoppingCartId = other.getShoppingCartId();
|
||||
if (this$shoppingCartId == null) {
|
||||
if (other$shoppingCartId == null) {
|
||||
break label47;
|
||||
}
|
||||
} else if (this$shoppingCartId.equals(other$shoppingCartId)) {
|
||||
break label47;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$quantity = this.getQuantity();
|
||||
Object other$quantity = other.getQuantity();
|
||||
if (this$quantity == null) {
|
||||
if (other$quantity != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$quantity.equals(other$quantity)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$custId.equals(other$custId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof OrderShoppingCartUpdateDTO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $shoppingCartId = this.getShoppingCartId();
|
||||
result = result * 59 + ($shoppingCartId == null ? 43 : $shoppingCartId.hashCode());
|
||||
Object $quantity = this.getQuantity();
|
||||
result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Long var10000 = this.getShoppingCartId();
|
||||
return "OrderShoppingCartUpdateDTO(shoppingCartId=" + var10000 + ", quantity=" + this.getQuantity() + ", custId=" + this.getCustId() + ")";
|
||||
}
|
||||
}
|
||||
|
|
@ -1,11 +1,21 @@
|
|||
package com.bonus.core.order.mobile.service;
|
||||
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartAddDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartClearDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartUpdateDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingSearchDTO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartAddResultVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartListMobileVO;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ShoppingCartBusiness {
|
||||
|
||||
OrderShoppingCartAddResultVO add(OrderShoppingCartAddDTO addDTO);
|
||||
|
||||
void update(OrderShoppingCartUpdateDTO updateDTO);
|
||||
|
||||
void clear(OrderShoppingCartClearDTO removeDTO);
|
||||
|
||||
List<OrderShoppingCartListMobileVO> listByCust(OrderShoppingSearchDTO searchDTO);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -10,28 +10,33 @@ import com.bonus.core.common.utils.LogUtil;
|
|||
import com.bonus.core.menu.dto.CheckDishesDto;
|
||||
import com.bonus.core.menu.model.AllocMealtimeModel;
|
||||
import com.bonus.core.menu.vo.CheckDishesVo;
|
||||
import com.bonus.core.order.common.constants.DetailTypeEnum;
|
||||
import com.bonus.core.order.common.constants.OrderTips;
|
||||
import com.bonus.core.order.common.constants.OrderTypeEnum;
|
||||
import com.bonus.core.order.common.model.OrderShoppingCart;
|
||||
import com.bonus.core.order.common.service.OrderShoppingCartService;
|
||||
import com.bonus.core.order.custom.OrderCustomBusiness;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartAddDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartClearDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingCartUpdateDTO;
|
||||
import com.bonus.core.order.mobile.dto.OrderShoppingSearchDTO;
|
||||
import com.bonus.core.order.mobile.service.ShoppingCartBusiness;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartAddResultVO;
|
||||
import com.bonus.core.order.mobile.vo.OrderShoppingCartListMobileVO;
|
||||
import com.bonus.core.order.utils.LeNumUtil;
|
||||
import com.bonus.core.supermarket.api.SupermarketApi;
|
||||
import com.bonus.core.supermarket.dto.SupermarketNotRemovedProductListDTO;
|
||||
import com.bonus.core.supermarket.model.SupermarketInfo;
|
||||
import com.bonus.core.supermarket.vo.SupermarketNotRemovedProductListVO;
|
||||
import com.bonus.i18n.I18n;
|
||||
import com.bonus.utils.id.Id;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.context.annotation.Lazy;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.time.LocalDate;
|
||||
import java.time.LocalTime;
|
||||
import java.util.*;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@Service
|
||||
|
|
@ -48,6 +53,76 @@ public class ShoppingCartBusinessImpl implements ShoppingCartBusiness {
|
|||
@Lazy
|
||||
protected SupermarketApi supermarketApi;
|
||||
|
||||
@Override
|
||||
public OrderShoppingCartAddResultVO add(OrderShoppingCartAddDTO addDTO) {
|
||||
OrderShoppingCartAddResultVO customVO = this.orderCustomBusiness.mobile().willAddShoppingCart(addDTO);
|
||||
if (customVO != null) {
|
||||
return customVO;
|
||||
} else {
|
||||
try{
|
||||
this.checkSubmitParam(addDTO);
|
||||
}catch (Exception e){
|
||||
|
||||
}
|
||||
// RLock lock = RedisUtil.getLock(OrderCacheConstants.shoppingCartLockKey(addDTO.getCustId()));
|
||||
OrderShoppingCart entity;
|
||||
try {
|
||||
OrderShoppingCart sameShoppingCart = (OrderShoppingCart)this.orderShoppingCartService.listByCust((new OrderShoppingSearchDTO()).setCustId(addDTO.getCustId()).setOrderType(addDTO.getOrderType())).stream().filter((s) -> {
|
||||
return this.isSameDishes(s, addDTO);
|
||||
}).findFirst().orElse(null);
|
||||
if (sameShoppingCart != null) {
|
||||
log.info("购物车已存在,更新数量:{} {} {}", new Object[]{sameShoppingCart.getShoppingCartId(), sameShoppingCart.getQuantity(), addDTO.getQuantity()});
|
||||
entity = sameShoppingCart;
|
||||
this.orderShoppingCartService.plusQuantity(sameShoppingCart.getShoppingCartId(), addDTO.getQuantity());
|
||||
sameShoppingCart.setQuantity(sameShoppingCart.getQuantity() + addDTO.getQuantity());
|
||||
} else {
|
||||
log.info("购物车不存在,新增:{}", addDTO);
|
||||
entity = addDTO.convertToEntity();
|
||||
entity.setShoppingCartId(Id.next());
|
||||
if (OrderTypeEnum.isCurrMealType(addDTO.getOrderType())) {
|
||||
addDTO.setOrderDate((LocalDate)null);
|
||||
addDTO.setMealtimeType((Integer)null);
|
||||
}
|
||||
this.orderShoppingCartService.insert(entity);
|
||||
}
|
||||
} finally {
|
||||
try {
|
||||
// if (lock.isHeldByCurrentThread() && lock.isLocked()) {
|
||||
// lock.unlock();
|
||||
// }
|
||||
} catch (Exception var11) {
|
||||
log.error("解锁异常", var11);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
OrderShoppingCartAddResultVO resultVO = OrderShoppingCartAddResultVO.of(entity);
|
||||
return this.orderCustomBusiness.mobile().didAddShoppingCart(addDTO, resultVO);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void update(OrderShoppingCartUpdateDTO updateDTO) {
|
||||
if (this.orderCustomBusiness.mobile().willUpdateShoppingCart(updateDTO)) {
|
||||
JavaxValidateUtils.validate(updateDTO);
|
||||
if (updateDTO.getQuantity() > 0) {
|
||||
this.orderShoppingCartService.updateQuantity(updateDTO.getShoppingCartId(), updateDTO.getQuantity());
|
||||
} else {
|
||||
this.orderShoppingCartService.removeByIds(CollUtil.newArrayList(new Long[]{updateDTO.getShoppingCartId()}));
|
||||
}
|
||||
this.orderCustomBusiness.mobile().didUpdateShoppingCart(updateDTO);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void clear(OrderShoppingCartClearDTO removeDTO) {
|
||||
if (this.orderCustomBusiness.mobile().willClearShoppingCart(removeDTO.getShoppingCartIds())) {
|
||||
JavaxValidateUtils.validate(removeDTO);
|
||||
this.orderShoppingCartService.removeByIds(removeDTO.getShoppingCartIds());
|
||||
this.orderCustomBusiness.mobile().didClearShoppingCart(removeDTO.getShoppingCartIds());
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<OrderShoppingCartListMobileVO> listByCust(OrderShoppingSearchDTO searchDTO) {
|
||||
JavaxValidateUtils.validate(searchDTO);
|
||||
|
|
@ -122,6 +197,15 @@ public class ShoppingCartBusinessImpl implements ShoppingCartBusiness {
|
|||
return cart.getGoodsDishesId().equals(checkDishes.getGoodsDishesId()) && cart.getMenuId().equals(checkDishes.getRecipeId()) && cart.getOrderDate().equals(checkDishes.getOrderDate()) && cart.getMealtimeType().equals(checkDishes.getMealtimeType());
|
||||
}
|
||||
}
|
||||
protected boolean isSameDishes(OrderShoppingCart cart, OrderShoppingCartAddDTO addDTO) {
|
||||
if (OrderTypeEnum.isShopCategory(addDTO.getOrderType()) && OrderTypeEnum.isShopCategory(cart.getOrderType())) {
|
||||
return cart.getGoodsDishesId().equals(addDTO.getGoodsDishesId()) && cart.getCanteenId().equals(addDTO.getCanteenId());
|
||||
} else if (OrderTypeEnum.isCurrMealType(addDTO.getOrderType()) && OrderTypeEnum.isCurrMealType(cart.getOrderType())) {
|
||||
return cart.getGoodsDishesId().equals(addDTO.getGoodsDishesId()) && cart.getMenuId().equals(addDTO.getMenuId()) && cart.getCanteenId().equals(addDTO.getCanteenId()) && cart.getStallId().equals(addDTO.getStallId());
|
||||
} else {
|
||||
return cart.getGoodsDishesId().equals(addDTO.getGoodsDishesId()) && cart.getMenuId().equals(addDTO.getMenuId()) && cart.getCanteenId().equals(addDTO.getCanteenId()) && cart.getStallId().equals(addDTO.getStallId()) && cart.getOrderDate().equals(addDTO.getOrderDate()) && cart.getMealtimeType().equals(addDTO.getMealtimeType());
|
||||
}
|
||||
}
|
||||
protected void fillCanteenStallMealtimeName(List<OrderShoppingCartListMobileVO> voList) {
|
||||
Map<Long, String> canteenNameMapById = MapUtil.newHashMap();
|
||||
Map<Long, AllocStall> stallMapById = MapUtil.newHashMap();
|
||||
|
|
@ -166,6 +250,46 @@ public class ShoppingCartBusinessImpl implements ShoppingCartBusiness {
|
|||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
protected void checkSubmitParam(OrderShoppingCartAddDTO addDTO) throws Exception {
|
||||
JavaxValidateUtils.validate(addDTO);
|
||||
if (!this.supportOrderTypes().contains(addDTO.getOrderType())) {
|
||||
throw new Exception(I18n.getMessage("order.un-support-order-type", new Object[0]));
|
||||
} else {
|
||||
if (OrderTypeEnum.isCanteenCategory(addDTO.getOrderType())) {
|
||||
if (addDTO.getOrderDate() == null || !LeNumUtil.isValidId(addDTO.getMealtimeType())) {
|
||||
throw new Exception(I18n.getMessage("order.mobile.cart-need-date-mealtime", new Object[0]));
|
||||
}
|
||||
|
||||
if (!DetailTypeEnum.isDishesCategory(addDTO.getDetailType())) {
|
||||
throw new Exception(I18n.getMessage("order.un-support-detail-type", new Object[0]));
|
||||
}
|
||||
|
||||
if (!LeNumUtil.isValidId(addDTO.getMenuId())) {
|
||||
throw new Exception(OrderTips.paramIllegal(":menuId(菜谱id)"));
|
||||
}
|
||||
|
||||
if (!LeNumUtil.isValidId(addDTO.getCanteenId())) {
|
||||
throw new Exception(OrderTips.paramIllegal(":canteenId(食堂id)"));
|
||||
}
|
||||
|
||||
if (!LeNumUtil.isValidId(addDTO.getStallId())) {
|
||||
throw new Exception(OrderTips.paramIllegal(":stallId(档口id)"));
|
||||
}
|
||||
} else if (OrderTypeEnum.isShopCategory(addDTO.getOrderType())) {
|
||||
if (!DetailTypeEnum.isProductType(addDTO.getDetailType())) {
|
||||
throw new Exception(I18n.getMessage("order.un-support-detail-type", new Object[0]));
|
||||
}
|
||||
|
||||
if (!LeNumUtil.isValidId(addDTO.getCanteenId())) {
|
||||
throw new Exception(OrderTips.paramIllegal(":canteenId(超市id)"));
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
public List<Integer> supportOrderTypes() {
|
||||
return CollUtil.toList(new Integer[]{OrderTypeEnum.CURR_MEAL.getKey(), OrderTypeEnum.RESERVE_MEAL.getKey(), OrderTypeEnum.SHOP.getKey(), OrderTypeEnum.RESERVE_SHOP.getKey()});
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,419 @@
|
|||
package com.bonus.core.order.mobile.vo;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import com.bonus.core.common.constant.LeRetCodeEnum;
|
||||
import com.bonus.core.common.utils.SysUtil;
|
||||
import com.bonus.core.order.common.model.OrderShoppingCart;
|
||||
import com.fasterxml.jackson.databind.JsonNode;
|
||||
|
||||
import java.time.LocalDate;
|
||||
|
||||
public class OrderShoppingCartAddResultVO {
|
||||
private Integer code;
|
||||
private String msg;
|
||||
private Long shoppingCartId;
|
||||
private Long custId;
|
||||
private Long menuId;
|
||||
private Long goodsDishesId;
|
||||
private String goodsDishesName;
|
||||
private String goodsDishesImgUrl;
|
||||
private Long canteenId;
|
||||
private Long stallId;
|
||||
private Integer detailType;
|
||||
private Integer orderType;
|
||||
private LocalDate orderDate;
|
||||
private Integer mealtimeType;
|
||||
private Integer quantity;
|
||||
private JsonNode extParam;
|
||||
|
||||
public String getGoodsDishesImgUrl() {
|
||||
return SysUtil.getCutFileUrl(this.goodsDishesImgUrl);
|
||||
}
|
||||
|
||||
public static OrderShoppingCartAddResultVO of(OrderShoppingCart orderShoppingCart) {
|
||||
OrderShoppingCartAddResultVO vo = (OrderShoppingCartAddResultVO)BeanUtil.copyProperties(orderShoppingCart, OrderShoppingCartAddResultVO.class, new String[0]);
|
||||
vo.setCode(LeRetCodeEnum.SUCC.getKey());
|
||||
vo.setMsg(LeRetCodeEnum.SUCC.getDesc());
|
||||
return vo;
|
||||
}
|
||||
|
||||
public Integer getCode() {
|
||||
return this.code;
|
||||
}
|
||||
|
||||
public String getMsg() {
|
||||
return this.msg;
|
||||
}
|
||||
|
||||
public Long getShoppingCartId() {
|
||||
return this.shoppingCartId;
|
||||
}
|
||||
|
||||
public Long getCustId() {
|
||||
return this.custId;
|
||||
}
|
||||
|
||||
public Long getMenuId() {
|
||||
return this.menuId;
|
||||
}
|
||||
|
||||
public Long getGoodsDishesId() {
|
||||
return this.goodsDishesId;
|
||||
}
|
||||
|
||||
public String getGoodsDishesName() {
|
||||
return this.goodsDishesName;
|
||||
}
|
||||
|
||||
public Long getCanteenId() {
|
||||
return this.canteenId;
|
||||
}
|
||||
|
||||
public Long getStallId() {
|
||||
return this.stallId;
|
||||
}
|
||||
|
||||
public Integer getDetailType() {
|
||||
return this.detailType;
|
||||
}
|
||||
|
||||
public Integer getOrderType() {
|
||||
return this.orderType;
|
||||
}
|
||||
|
||||
public LocalDate getOrderDate() {
|
||||
return this.orderDate;
|
||||
}
|
||||
|
||||
public Integer getMealtimeType() {
|
||||
return this.mealtimeType;
|
||||
}
|
||||
|
||||
public Integer getQuantity() {
|
||||
return this.quantity;
|
||||
}
|
||||
|
||||
public JsonNode getExtParam() {
|
||||
return this.extParam;
|
||||
}
|
||||
|
||||
public void setCode(final Integer code) {
|
||||
this.code = code;
|
||||
}
|
||||
|
||||
public void setMsg(final String msg) {
|
||||
this.msg = msg;
|
||||
}
|
||||
|
||||
public void setShoppingCartId(final Long shoppingCartId) {
|
||||
this.shoppingCartId = shoppingCartId;
|
||||
}
|
||||
|
||||
public void setCustId(final Long custId) {
|
||||
this.custId = custId;
|
||||
}
|
||||
|
||||
public void setMenuId(final Long menuId) {
|
||||
this.menuId = menuId;
|
||||
}
|
||||
|
||||
public void setGoodsDishesId(final Long goodsDishesId) {
|
||||
this.goodsDishesId = goodsDishesId;
|
||||
}
|
||||
|
||||
public void setGoodsDishesName(final String goodsDishesName) {
|
||||
this.goodsDishesName = goodsDishesName;
|
||||
}
|
||||
|
||||
public void setGoodsDishesImgUrl(final String goodsDishesImgUrl) {
|
||||
this.goodsDishesImgUrl = goodsDishesImgUrl;
|
||||
}
|
||||
|
||||
public void setCanteenId(final Long canteenId) {
|
||||
this.canteenId = canteenId;
|
||||
}
|
||||
|
||||
public void setStallId(final Long stallId) {
|
||||
this.stallId = stallId;
|
||||
}
|
||||
|
||||
public void setDetailType(final Integer detailType) {
|
||||
this.detailType = detailType;
|
||||
}
|
||||
|
||||
public void setOrderType(final Integer orderType) {
|
||||
this.orderType = orderType;
|
||||
}
|
||||
|
||||
public void setOrderDate(final LocalDate orderDate) {
|
||||
this.orderDate = orderDate;
|
||||
}
|
||||
|
||||
public void setMealtimeType(final Integer mealtimeType) {
|
||||
this.mealtimeType = mealtimeType;
|
||||
}
|
||||
|
||||
public void setQuantity(final Integer quantity) {
|
||||
this.quantity = quantity;
|
||||
}
|
||||
|
||||
public void setExtParam(final JsonNode extParam) {
|
||||
this.extParam = extParam;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean equals(final Object o) {
|
||||
if (o == this) {
|
||||
return true;
|
||||
} else if (!(o instanceof OrderShoppingCartAddResultVO)) {
|
||||
return false;
|
||||
} else {
|
||||
OrderShoppingCartAddResultVO other = (OrderShoppingCartAddResultVO)o;
|
||||
if (!other.canEqual(this)) {
|
||||
return false;
|
||||
} else {
|
||||
label203: {
|
||||
Object this$code = this.getCode();
|
||||
Object other$code = other.getCode();
|
||||
if (this$code == null) {
|
||||
if (other$code == null) {
|
||||
break label203;
|
||||
}
|
||||
} else if (this$code.equals(other$code)) {
|
||||
break label203;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$shoppingCartId = this.getShoppingCartId();
|
||||
Object other$shoppingCartId = other.getShoppingCartId();
|
||||
if (this$shoppingCartId == null) {
|
||||
if (other$shoppingCartId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$shoppingCartId.equals(other$shoppingCartId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$custId = this.getCustId();
|
||||
Object other$custId = other.getCustId();
|
||||
if (this$custId == null) {
|
||||
if (other$custId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$custId.equals(other$custId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label182: {
|
||||
Object this$menuId = this.getMenuId();
|
||||
Object other$menuId = other.getMenuId();
|
||||
if (this$menuId == null) {
|
||||
if (other$menuId == null) {
|
||||
break label182;
|
||||
}
|
||||
} else if (this$menuId.equals(other$menuId)) {
|
||||
break label182;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label175: {
|
||||
Object this$goodsDishesId = this.getGoodsDishesId();
|
||||
Object other$goodsDishesId = other.getGoodsDishesId();
|
||||
if (this$goodsDishesId == null) {
|
||||
if (other$goodsDishesId == null) {
|
||||
break label175;
|
||||
}
|
||||
} else if (this$goodsDishesId.equals(other$goodsDishesId)) {
|
||||
break label175;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label168: {
|
||||
Object this$canteenId = this.getCanteenId();
|
||||
Object other$canteenId = other.getCanteenId();
|
||||
if (this$canteenId == null) {
|
||||
if (other$canteenId == null) {
|
||||
break label168;
|
||||
}
|
||||
} else if (this$canteenId.equals(other$canteenId)) {
|
||||
break label168;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$stallId = this.getStallId();
|
||||
Object other$stallId = other.getStallId();
|
||||
if (this$stallId == null) {
|
||||
if (other$stallId != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$stallId.equals(other$stallId)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label154: {
|
||||
Object this$detailType = this.getDetailType();
|
||||
Object other$detailType = other.getDetailType();
|
||||
if (this$detailType == null) {
|
||||
if (other$detailType == null) {
|
||||
break label154;
|
||||
}
|
||||
} else if (this$detailType.equals(other$detailType)) {
|
||||
break label154;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$orderType = this.getOrderType();
|
||||
Object other$orderType = other.getOrderType();
|
||||
if (this$orderType == null) {
|
||||
if (other$orderType != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$orderType.equals(other$orderType)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label140: {
|
||||
Object this$mealtimeType = this.getMealtimeType();
|
||||
Object other$mealtimeType = other.getMealtimeType();
|
||||
if (this$mealtimeType == null) {
|
||||
if (other$mealtimeType == null) {
|
||||
break label140;
|
||||
}
|
||||
} else if (this$mealtimeType.equals(other$mealtimeType)) {
|
||||
break label140;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$quantity = this.getQuantity();
|
||||
Object other$quantity = other.getQuantity();
|
||||
if (this$quantity == null) {
|
||||
if (other$quantity != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$quantity.equals(other$quantity)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$msg = this.getMsg();
|
||||
Object other$msg = other.getMsg();
|
||||
if (this$msg == null) {
|
||||
if (other$msg != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$msg.equals(other$msg)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
label119: {
|
||||
Object this$goodsDishesName = this.getGoodsDishesName();
|
||||
Object other$goodsDishesName = other.getGoodsDishesName();
|
||||
if (this$goodsDishesName == null) {
|
||||
if (other$goodsDishesName == null) {
|
||||
break label119;
|
||||
}
|
||||
} else if (this$goodsDishesName.equals(other$goodsDishesName)) {
|
||||
break label119;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
label112: {
|
||||
Object this$goodsDishesImgUrl = this.getGoodsDishesImgUrl();
|
||||
Object other$goodsDishesImgUrl = other.getGoodsDishesImgUrl();
|
||||
if (this$goodsDishesImgUrl == null) {
|
||||
if (other$goodsDishesImgUrl == null) {
|
||||
break label112;
|
||||
}
|
||||
} else if (this$goodsDishesImgUrl.equals(other$goodsDishesImgUrl)) {
|
||||
break label112;
|
||||
}
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$orderDate = this.getOrderDate();
|
||||
Object other$orderDate = other.getOrderDate();
|
||||
if (this$orderDate == null) {
|
||||
if (other$orderDate != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$orderDate.equals(other$orderDate)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
Object this$extParam = this.getExtParam();
|
||||
Object other$extParam = other.getExtParam();
|
||||
if (this$extParam == null) {
|
||||
if (other$extParam != null) {
|
||||
return false;
|
||||
}
|
||||
} else if (!this$extParam.equals(other$extParam)) {
|
||||
return false;
|
||||
}
|
||||
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
protected boolean canEqual(final Object other) {
|
||||
return other instanceof OrderShoppingCartAddResultVO;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int hashCode() {
|
||||
int result = 1;
|
||||
Object $code = this.getCode();
|
||||
result = result * 59 + ($code == null ? 43 : $code.hashCode());
|
||||
Object $shoppingCartId = this.getShoppingCartId();
|
||||
result = result * 59 + ($shoppingCartId == null ? 43 : $shoppingCartId.hashCode());
|
||||
Object $custId = this.getCustId();
|
||||
result = result * 59 + ($custId == null ? 43 : $custId.hashCode());
|
||||
Object $menuId = this.getMenuId();
|
||||
result = result * 59 + ($menuId == null ? 43 : $menuId.hashCode());
|
||||
Object $goodsDishesId = this.getGoodsDishesId();
|
||||
result = result * 59 + ($goodsDishesId == null ? 43 : $goodsDishesId.hashCode());
|
||||
Object $canteenId = this.getCanteenId();
|
||||
result = result * 59 + ($canteenId == null ? 43 : $canteenId.hashCode());
|
||||
Object $stallId = this.getStallId();
|
||||
result = result * 59 + ($stallId == null ? 43 : $stallId.hashCode());
|
||||
Object $detailType = this.getDetailType();
|
||||
result = result * 59 + ($detailType == null ? 43 : $detailType.hashCode());
|
||||
Object $orderType = this.getOrderType();
|
||||
result = result * 59 + ($orderType == null ? 43 : $orderType.hashCode());
|
||||
Object $mealtimeType = this.getMealtimeType();
|
||||
result = result * 59 + ($mealtimeType == null ? 43 : $mealtimeType.hashCode());
|
||||
Object $quantity = this.getQuantity();
|
||||
result = result * 59 + ($quantity == null ? 43 : $quantity.hashCode());
|
||||
Object $msg = this.getMsg();
|
||||
result = result * 59 + ($msg == null ? 43 : $msg.hashCode());
|
||||
Object $goodsDishesName = this.getGoodsDishesName();
|
||||
result = result * 59 + ($goodsDishesName == null ? 43 : $goodsDishesName.hashCode());
|
||||
Object $goodsDishesImgUrl = this.getGoodsDishesImgUrl();
|
||||
result = result * 59 + ($goodsDishesImgUrl == null ? 43 : $goodsDishesImgUrl.hashCode());
|
||||
Object $orderDate = this.getOrderDate();
|
||||
result = result * 59 + ($orderDate == null ? 43 : $orderDate.hashCode());
|
||||
Object $extParam = this.getExtParam();
|
||||
result = result * 59 + ($extParam == null ? 43 : $extParam.hashCode());
|
||||
return result;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String toString() {
|
||||
Integer var10000 = this.getCode();
|
||||
return "OrderShoppingCartAddResultVO(code=" + var10000 + ", msg=" + this.getMsg() + ", shoppingCartId=" + this.getShoppingCartId() + ", custId=" + this.getCustId() + ", menuId=" + this.getMenuId() + ", goodsDishesId=" + this.getGoodsDishesId() + ", goodsDishesName=" + this.getGoodsDishesName() + ", goodsDishesImgUrl=" + this.getGoodsDishesImgUrl() + ", canteenId=" + this.getCanteenId() + ", stallId=" + this.getStallId() + ", detailType=" + this.getDetailType() + ", orderType=" + this.getOrderType() + ", orderDate=" + String.valueOf(this.getOrderDate()) + ", mealtimeType=" + this.getMealtimeType() + ", quantity=" + this.getQuantity() + ", extParam=" + String.valueOf(this.getExtParam()) + ")";
|
||||
}
|
||||
}
|
||||
37
bonus.iml
37
bonus.iml
|
|
@ -1,8 +1,39 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<module version="4">
|
||||
<component name="AdditionalModuleElements">
|
||||
<content url="file://$MODULE_DIR$" dumb="true">
|
||||
<module org.jetbrains.idea.maven.project.MavenProjectsManager.isMavenModule="true" type="JAVA_MODULE" version="4">
|
||||
<component name="NewModuleRootManager" LANGUAGE_LEVEL="JDK_1_8">
|
||||
<output url="file://$MODULE_DIR$/target/classes" />
|
||||
<output-test url="file://$MODULE_DIR$/target/test-classes" />
|
||||
<content url="file://$MODULE_DIR$">
|
||||
<excludeFolder url="file://$MODULE_DIR$/target" />
|
||||
</content>
|
||||
<orderEntry type="inheritedJdk" />
|
||||
<orderEntry type="sourceFolder" forTests="false" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter-bootstrap:3.1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-starter:3.1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter:2.7.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot:2.7.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-context:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-aop:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-beans:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-expression:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-autoconfigure:2.7.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.boot:spring-boot-starter-logging:2.7.18" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-classic:1.2.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: ch.qos.logback:logback-core:1.2.12" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:slf4j-api:1.7.36" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-to-slf4j:2.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.apache.logging.log4j:log4j-api:2.17.2" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.slf4j:jul-to-slf4j:1.7.36" level="project" />
|
||||
<orderEntry type="library" name="Maven: jakarta.annotation:jakarta.annotation-api:1.3.5" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-core:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework:spring-jcl:5.3.33" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.yaml:snakeyaml:1.30" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-context:3.1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-crypto:5.7.11" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.cloud:spring-cloud-commons:3.1.7" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.springframework.security:spring-security-rsa:1.0.11.RELEASE" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcpkix-jdk15on:1.69" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcprov-jdk15on:1.69" level="project" />
|
||||
<orderEntry type="library" name="Maven: org.bouncycastle:bcutil-jdk15on:1.69" level="project" />
|
||||
</component>
|
||||
</module>
|
||||
Reference in New Issue