zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -165,6 +165,7 @@ sysProjServices.setVipId(serviceOrderDto.getVipId()); sysProjServices.setYyTime(serviceOrderDto.getYyTime()); sysProjServices.setRemark(serviceOrderDto.getRemark()); sysProjServices.setBedId(serviceOrderDto.getBedId()); List<SysBeauticianState> sysBeauticianStates = new ArrayList<>(); serviceOrderDto.getProjItems().forEach(item ->{ zq-erp/src/main/java/com/matrix/system/app/action/AppOccupancyController.java
@@ -4,6 +4,7 @@ import com.matrix.core.pojo.AjaxResult; import com.matrix.core.tools.DateUtil; import com.matrix.core.tools.WebUtil; import com.matrix.system.app.dto.FreeBedDto; import com.matrix.system.app.vo.StoreListVo; import com.matrix.system.common.bean.SysUsers; import com.matrix.system.common.service.SysUsersService; @@ -11,9 +12,12 @@ import com.matrix.system.hive.action.BaseController; import com.matrix.system.hive.action.OccupancyController; import com.matrix.system.hive.bean.SysBeauticianState; import com.matrix.system.hive.bean.SysBedInfo; import com.matrix.system.hive.bean.SysProjServices; import com.matrix.system.hive.bean.SysWorkBeatuistaff; import com.matrix.system.hive.dao.SysBeauticianStateDao; import com.matrix.system.hive.plugin.util.CollectionUtils; import com.matrix.system.hive.service.SysBedInfoService; import com.matrix.system.hive.service.SysWorkBeatuistaffService; import com.matrix.system.hive.service.SysWorktimeService; import io.swagger.annotations.Api; @@ -22,6 +26,7 @@ import io.swagger.annotations.ApiResponses; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Controller; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; import javax.annotation.Resource; @@ -43,6 +48,9 @@ @Resource private OccupancyController occupancyController; @Autowired private SysBedInfoService bedInfoService; /** * 获取员工预约情况 */ @@ -57,4 +65,17 @@ return occupancyController.getCwzyList(timeStr,sysUsers.getShopId()); } @ApiOperation(value = "获取床位信息", notes = "获取床位信息") @PostMapping(value = "/showFreedBed") public AjaxResult showFreedBed(@RequestBody @Validated FreeBedDto freeBedDto) { SysProjServices sysProjServices = new SysProjServices(); sysProjServices.setStartTime(freeBedDto.getStartTime()); sysProjServices.setTotalTime(freeBedDto.getTotalTime()); SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY); sysProjServices.setShopId(sysUsers.getShopId()); List<SysBedInfo> beds = bedInfoService.findFreeBed(sysProjServices); return new AjaxResult(AjaxResult.STATUS_SUCCESS, beds, 0); } } zq-erp/src/main/java/com/matrix/system/app/dto/CreateServiceOrderDto.java
@@ -25,6 +25,9 @@ @ApiModelProperty(value = "美疗师ID") private Long beautyId; @ApiModelProperty(value = "床位ID") private Long bedId; @NotNull(message = "请选择预约时间") @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @ApiModelProperty(value = "预约时间") @@ -42,6 +45,14 @@ @ApiModelProperty(value = "资金密码") private String password; public Long getBedId() { return bedId; } public void setBedId(Long bedId) { this.bedId = bedId; } public String getPassword() { return password; } zq-erp/src/main/java/com/matrix/system/app/dto/FreeBedDto.java
New file @@ -0,0 +1,43 @@ package com.matrix.system.app.dto; import com.fasterxml.jackson.annotation.JsonFormat; import com.matrix.core.tools.DateUtil; import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModelProperty; import lombok.Data; import javax.validation.constraints.NotNull; import java.util.Date; /** * @author wzy * @date 2022-03-15 **/ @ApiModel(value = "FreeBedDto", description = "获取床位信息接口接受参数类") public class FreeBedDto { @NotNull(message = "选择预约时间") @JsonFormat(pattern = DateUtil.DATE_FORMAT_MM, timezone = "GMT+8") @ApiModelProperty(value = "预约开始时间") private Date startTime; @NotNull(message = "输入服务时长") @ApiModelProperty(value = "服务时长") private Integer totalTime; public Date getStartTime() { return startTime; } public void setStartTime(Date startTime) { this.startTime = startTime; } public Integer getTotalTime() { return totalTime; } public void setTotalTime(Integer totalTime) { this.totalTime = totalTime; } } zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java
@@ -23,6 +23,7 @@ import org.apache.commons.collections.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Transactional; import java.math.BigDecimal; import java.util.ArrayList; @@ -60,6 +61,7 @@ private ShopActivitiesSeckillRecordDao shopActivitiesSeckillRecordDao; @Override @Transactional(rollbackFor = Exception.class) public AjaxResult createSecKillOrder(CreateSecKillDTO secKillDTO) throws Exception { SysVipInfo sysVipInfo = userCacheManager.getLoginUser(); ShopActivitiesSeckillInfo seckillInfo = shopActivitiesSeckillInfoDao.selectById(secKillDTO.getId()); @@ -173,7 +175,7 @@ //TODO 更新库存和销量 更新库存和销量[考虑和erp库存联动] wxShopOrderUtil.updateProductAndSkuInfo(details); shopOrder.setUserId(secKillDTO.getId()); shopOrder.setUserId(sysVipInfo.getId()); shopOrder.setCreateBy("微信小程序生成"); shopOrder.setUpdateBy("微信小程序生成"); shopOrder.setCommodityPrice(secKillDTO.getPrice()); zq-erp/src/main/resources/config/application-alpha.properties
@@ -3,9 +3,9 @@ #线上测试环境 spring.datasource.username=hive spring.datasource.password=hive123!@# spring.datasource.url=jdbc:mysql://124.70.222.34/hive_prd?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 spring.datasource.username=db_alpha spring.datasource.password=Alpha!qaz@wsx spring.datasource.url=jdbc:mysql://124.70.222.34/db_alpha?useUnicode=true&characterEncoding=utf8&zeroDateTimeBehavior=CONVERT_TO_NULL&allowMultiQueries=true&transformedBitIsBoolean=true&serverTimezone=GMT%2B8 @@ -73,9 +73,9 @@ default_password=123 #nginx静态资源访问地址 static_resource_url=https://hive.file.csxuncong.com/uploadeFile/ static_resource_url=https://hive.file.csxuncong.com/uploadeFile/alpha/ #文件保存地址 file_storage_path=/mnt/hive/static/uploadeFile/ file_storage_path=/mnt/hive/static/uploadeFile/alpha/ #文件上传大小字节为单位 10MB maxUploadSize=10485760 @@ -168,3 +168,27 @@ gzh_appid=wx57e6335559bdbda6 gzh_secret=ecb408af170e3890e6544290cad33760 #百度编辑器,覆盖默认配置 ueditor.imageUrlPrefix=https://hive.file.csxuncong.com/uploadeFile/alpha ueditor.imagePathFormat=/image/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.scrawlPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.scrawlUrlPrefix=https://hive.file.csxuncong.com/uploadeFile/alpha ueditor.snapscreenPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.snapscreenUrlPrefix=https://hive.file.csxuncong.com/uploadeFile/alpha ueditor.catcherPathFormat=/ueditor/jsp/upload/image/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.catcherUrlPrefix=https://hive.file.csxuncong.com/uploadeFile/alpha ueditor.videoPathFormat=/ueditor/jsp/upload/video/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.videoUrlPrefix=http://127.0.0.1:1088/uploadeFile/ ueditor.filePathFormat=/ueditor/jsp/upload/file/{yyyy}{mm}{dd}/{time}{rand:6} ueditor.fileUrlPrefix=http://127.0.0.1:1088/uploadeFile/ ueditor.imageManagerListPath=http://127.0.0.1:1088/uploadeFile/ ueditor.fileManagerListPath=http://127.0.0.1:1088/uploadeFile/