| | |
| | | package com.matrix.system.app.action; |
| | | |
| | | import com.matrix.component.rabbitmq.RabiitMqTemplate; |
| | | import com.matrix.core.constance.MatrixConstance; |
| | | import com.matrix.core.exception.GlobleException; |
| | | import com.matrix.core.pojo.AjaxResult; |
| | |
| | | import com.matrix.system.hive.service.SysProjServicesService; |
| | | import com.matrix.system.hive.service.SysProjUseService; |
| | | import com.matrix.system.hive.service.SysVipInfoService; |
| | | import com.matrix.system.shopXcx.mqTask.MQTaskRouting; |
| | | import com.matrix.system.wechart.templateMsg.UniformMsgParam; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import io.swagger.annotations.ApiResponse; |
| | | import io.swagger.annotations.ApiResponses; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | |
| | | |
| | | @Autowired |
| | | private SysBeauticianStateService sysBeauticianStateService; |
| | | |
| | | @Autowired |
| | | private RabiitMqTemplate rabiitMqTemplate; |
| | | |
| | | @Value("${evn}") |
| | | private String evn; |
| | | |
| | | @ApiOperation(value ="获取用户项目/套餐列表", notes = "获取用户项目/套餐列表") |
| | | @ApiResponses({ |
| | |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "2": |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | queryUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | | queryUse.setIsOver(Dictionary.FLAG_NO_N); |
| | | break; |
| | | case "3": |
| | | queryUse.setTargetFailTime(DateUtil.getDateAfterMonth(new Date(), 1)); |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_WX); |
| | | queryUse.setIsOver(Dictionary.FLAG_YES_Y); |
| | | break; |
| | | default: |
| | | queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX); |
| | |
| | | if (balanceverifyResult.isError()) { |
| | | return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg()); |
| | | } |
| | | |
| | | // 设置状态为待预约 |
| | | sysProjServices.setState(Dictionary.SERVICE_STATU_DYY); |
| | | SysProjServices newSysProjServices = projServicesService.addSysProjServices(sysProjServices); |
| | | if (newSysProjServices != null) { |
| | | return AjaxResult.buildSuccessInstance("下单成功"); |
| | |
| | | services.setState(Dictionary.BEATUI_STATE_DYY); |
| | | int i = projServicesService.modify(services); |
| | | if (i > 0) { |
| | | //发送微信公众号提醒 |
| | | services=projServicesService.findById(services.getId()); |
| | | UniformMsgParam uniformMsgParam=new UniformMsgParam(services.getCompanyId(),UniformMsgParam.GZH_YYCG); |
| | | uniformMsgParam.put("serviceId",services.getId()); |
| | | rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_UNIFORM_TEMPLATE_MSG+evn,uniformMsgParam.toJSONString()); |
| | | |
| | | return AjaxResult.buildSuccessInstance("确认成功"); |
| | | } |
| | | return AjaxResult.buildFailInstance("确认失败"); |