Helius
2021-01-16 fa215acbed2974de77844a0749a68d27076e920b
Merge branch 'api' of https://gitee.com/jyyforjava/zq-erp into api
1 files added
14 files modified
461 ■■■■ changed files
zq-erp/src/main/java/com/matrix/core/pojo/PaginationDto.java 75 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/pojo/PaginationVO.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java 3 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/ServiceOrderListDto.java 22 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/ServiceVipProjDto.java 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/vo/ServiceOrderListProjVo.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/vo/ServiceOrderListVo.java 11 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java 8 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java 273 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml 25 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml 9 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopWxtemplateMsgDao.xml 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/templates/views/admin/shop/templateMsg-form.html 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/core/pojo/PaginationDto.java
New file
@@ -0,0 +1,75 @@
package com.matrix.core.pojo;
/**
 * @author 姜友瑶 E-mail:<935090232@qq.com>
 * @date 2021年1月15日
 * @description 分页信息类
 */
public class PaginationDto {
    /**
     * 起点
     */
    private Integer offset = 0;
    /**
     * 查询条数
     */
    private Integer limit =15;
    /**
     * 排序方式
     */
    private String order;
    /**
     * 排序字段
     */
    private String sort;
    public Integer getOffset() {
        return offset;
    }
    public void setOffset(Integer offset) {
        this.offset = offset;
    }
    public Integer getLimit() {
        return limit;
    }
    public void setLimit(Integer limit) {
        this.limit = limit;
    }
    public String getOrder() {
        return order;
    }
    public void setOrder(String order) {
        this.order = order;
    }
    public String getSort() {
        return propertyToColumn(sort);
    }
    public void setSort(String sort) {
        this.sort = sort;
    }
    public String propertyToColumn(String property) {
        if(property==null){
            return null;
        }
        StringBuffer columnName = new StringBuffer(property);
        for (int i = 0; i < columnName.length(); i++) {
            if (columnName.charAt(i) >= 'A' && columnName.charAt(i) <= 'Z') {
                String upcase = "_" + (columnName.charAt(i) + "").toLowerCase();
                columnName.replace(i, i + 1, upcase);
            }
        }
        return columnName.toString();
    }
}
zq-erp/src/main/java/com/matrix/core/pojo/PaginationVO.java
@@ -5,7 +5,7 @@
 * @date 2016年6月24日
 * @description 分页信息类
 */
public class PaginationVO extends EntityDTO{
public class PaginationVO {
    /**
     * 起点
zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java
@@ -175,6 +175,9 @@
        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("下单成功");
zq-erp/src/main/java/com/matrix/system/app/dto/ServiceOrderListDto.java
@@ -16,12 +16,34 @@
    @ApiModelProperty(value = "状态 0/全部 1/待确认 2/待排班 3/待配料 4/待服务 5/服务中 6/已完成")
    private String status;
    @ApiModelProperty(value = "客户视角状态 0/全部 1/待确认 2进行中(待排班/待配料/待服务/服务中) 3/待评价(已完成/服务结束) 4/已评价 5/已取消 ")
    private String vipStatus;
    @ApiModelProperty(hidden = true)
    private Long shopId;
    @ApiModelProperty(hidden = true)
    private Long userId;
    @ApiModelProperty(value = "客户ID")
    private Long vipId;
    public String getVipStatus() {
        return vipStatus;
    }
    public void setVipStatus(String vipStatus) {
        this.vipStatus = vipStatus;
    }
    public Long getVipId() {
        return vipId;
    }
    public void setVipId(Long vipId) {
        this.vipId = vipId;
    }
    public Long getUserId() {
        return userId;
    }
zq-erp/src/main/java/com/matrix/system/app/dto/ServiceVipProjDto.java
@@ -19,7 +19,7 @@
    @ApiModelProperty(value = "查询参数")
    private String queryKey;
    @ApiModelProperty(value = "类型 0-全部 1-有效 2-有效 3-一个月内过期")
    @ApiModelProperty(value = "类型 0-全部 1-有效 2-无效 3-一个月内过期")
    private String type;
    public Long getVipId() {
zq-erp/src/main/java/com/matrix/system/app/vo/ServiceOrderListProjVo.java
@@ -19,6 +19,8 @@
    @ApiModelProperty(value = "美疗师")
    private String beautyName;
    public Long getId() {
        return id;
    }
zq-erp/src/main/java/com/matrix/system/app/vo/ServiceOrderListVo.java
@@ -34,6 +34,9 @@
    @ApiModelProperty(value = "会员名称")
    private String vipName;
    @ApiModelProperty(value = "门店名称")
    private String shopName;
    @ApiModelProperty(value = "服务时长")
    private Integer timeLength;
@@ -122,6 +125,14 @@
        return status;
    }
    public String getShopName() {
        return shopName;
    }
    public void setShopName(String shopName) {
        this.shopName = shopName;
    }
    public void setStatus(String status) {
        switch (status) {
            case "待预约" :
zq-erp/src/main/java/com/matrix/system/common/actions/AdminAction.java
@@ -139,9 +139,7 @@
        SysUsers loginUser = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
        loginUser.setCreateBy(loginUser.getSuName());
        sysUsers.setCompanyId(loginUser.getCompanyId());
        sysUsers.setShopId(loginUser.getShopId());
        int i = sysUsersService.addAdmin(sysUsers);
        if (i > 0) {
            return new AjaxResult(AjaxResult.STATUS_SUCCESS, SystemMessageCode.ADD_SUCCES, AppVocabularyCode.ADMIN);
        } else {
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -119,13 +119,15 @@
    public SysProjServices addSysProjServices(SysProjServices sysProjServices) throws GlobleException {
        //创建服务单
        if(WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY)!=null){
        SysUsers user = (SysUsers) WebUtil.getSession().getAttribute(MatrixConstance.LOGIN_KEY);
        sysProjServices.setCreateStaffId(user.getSuId());
        sysProjServices.setShopId(user.getShopId());
        sysProjServices.setCompanyId(user.getCompanyId());
        }
        sysProjServices.setCreateTime(new Date());
        // 设置状态为待预约
        sysProjServices.setState(Dictionary.SERVICE_STATU_DQR);
        sysProjServices.setServiceNo(codeService.getServiceOrderCode());
        Double hkPrice = 0.0;
        int i = sysProjServicesDao.insert(sysProjServices);
@@ -209,7 +211,7 @@
            //插入订单明细
            sysBeauticianState.setProjId(sysProjInfo.getId());
            sysBeauticianState.setServicesId(sysProjServices.getId());
            sysBeauticianState.setShopId(user.getShopId());
            sysBeauticianState.setShopId(sysProjServices.getShopId());
            sysBeauticianState.setState(Dictionary.BEATUI_STATE_DYY);
            beauticianStateDao.insert(sysBeauticianState);
        }
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysVipInfoServiceImpl.java
@@ -448,6 +448,7 @@
        }
        SysVipInfo vipInfo = new SysVipInfo();
        vipInfo.setPhoto(addVipDto.getPhoto());
        vipInfo.setVipName(addVipDto.getVipName());
        vipInfo.setVipNo(addVipDto.getVipNo());
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/YuyueAction.java
@@ -1,37 +1,42 @@
package com.matrix.system.shopXcx.api.action;
import com.alibaba.fastjson.JSONObject;
import com.matrix.biz.bean.BizUser;
import com.matrix.biz.dao.BizUserDao;
import com.matrix.component.rabbitmq.RabiitMqTemplate;
import com.matrix.component.redis.RedisUserLoginUtils;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.exception.GlobleException;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.pojo.PaginationVO;
import com.matrix.core.pojo.VerifyResult;
import com.matrix.core.tools.DateUtil;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.dto.ServiceOrderListDto;
import com.matrix.system.app.mapper.SysBeauticianStateMapper;
import com.matrix.system.app.mapper.SysProjServiceMapper;
import com.matrix.system.app.mapper.SysProjUseMapper;
import com.matrix.system.app.vo.*;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.common.dao.SysUsersDao;
import com.matrix.system.common.interceptor.HostInterceptor;
import com.matrix.system.common.tools.DataAuthUtil;
import com.matrix.system.common.tools.LocationUtil;
import com.matrix.system.constance.Dictionary;
import com.matrix.system.hive.bean.*;
import com.matrix.system.hive.dao.*;
import com.matrix.system.hive.plugin.message.StringUtil;
import com.matrix.system.hive.plugin.util.CollectionUtils;
import com.matrix.core.tools.DateUtil;
import com.matrix.system.hive.service.CodeService;
import com.matrix.system.hive.service.SysProjUseService;
import com.matrix.system.hive.service.SysWorkBeatuistaffService;
import com.matrix.system.hive.service.SysWorktimeService;
import com.matrix.system.hive.service.*;
import com.matrix.system.shopXcx.bean.ShopProduct;
import com.matrix.system.shopXcx.dao.ShopProductDao;
import com.matrix.system.shopXcx.dao.ShopSkuDao;
import com.matrix.system.shopXcx.dto.YYDayOfWeek;
import com.matrix.system.shopXcx.dto.YYmonth;
import com.matrix.system.shopXcx.mqTask.DTO.UserProjInfo;
import com.matrix.system.shopXcx.mqTask.MQTaskRouting;
import com.matrix.system.shopXcx.shopEnum.TemplateMsgType;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Controller;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource;
@@ -52,10 +57,18 @@
    SysShopInfoDao shopInfoDao;
    @Autowired
    private SysVipInfoDao vipDap;
    private SysVipInfoDao vipInfoDao;
    @Autowired
    private OnlinebookingDao onlinebookingDao;
    @Autowired
    private SysProjServicesService projServicesService;
    @Autowired
    private  SysProjServicesDao projServicesDao;
    @Autowired
    private  SysBeauticianStateService sysBeauticianStateService;
    @Autowired
    RedisUserLoginUtils redisUserLoginUtils;
@@ -72,7 +85,11 @@
    @Autowired
    RabiitMqTemplate rabiitMqTemplate;
    @Autowired
    SysProjUseDao projUseDao;
    @Autowired
    ShopSkuDao skuDao;
    @Autowired
    ShoppingGoodsAssembleDao shoppingGoodsAssembleDao;
@@ -197,45 +214,42 @@
    @ResponseBody
    public
    AjaxResult getUserPro(@PathVariable String phone) {
        SysVipInfo vipInfo = vipDap.selectByPhone(phone);
        // 根据时间获取一段排班码
        Map<Object, Object> taocanProjMap = new HashMap<>();
        List<UserProjInfo> userProjInfoList = new ArrayList();
        SysProjUse sysProjUse = new SysProjUse();
        sysProjUse.setVipId(vipInfo.getId());
        sysProjUse.setIsOver(Dictionary.DELETED_N);
        sysProjUse.setIsOver(Dictionary.DELETED_N);
        sysProjUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
        // 查询出该会员的所有可消耗的选择
        List<SysProjUse> sysProjUseList = projUseService.findByModel(sysProjUse);
        for (int i = 0; i < sysProjUseList.size(); i++) {
            if (sysProjUseList.get(i).getTaocanId() != null) {
                String flag = sysProjUseList.get(i).getOrderItemId()+"";
                if (taocanProjMap.keySet().contains(flag)) {
                    ((UserProjInfo) taocanProjMap.get(flag)).getChildPro().add(coversion(sysProjUseList.get(i)));
                } else {
                    SysProjUse pru = sysProjUseList.get(i);
                    UserProjInfo taocan = new UserProjInfo();
                    taocan.setId(pru.getId());
                    taocan.setName(pru.getProjName());
                    if (pru.getSurplusCount() > 10000) {
                        taocan.setSurplusCount("不限");
                    } else {
                        taocan.setSurplusCount(pru.getSurplusCount() + "");
        SysVipInfo vipInfo = vipInfoDao.selectByPhone(phone);
        if (vipInfo == null) {
            throw new GlobleException("会员不存在");
                    }
                    taocan.setChildPro(new ArrayList<UserProjInfo>());
                    taocan.getChildPro().add(coversion(pru));
                    taocanProjMap.put(flag, taocan);
        ServiceProductListVo productListVo = new ServiceProductListVo();
        productListVo.setName(vipInfo.getVipName());
        productListVo.setVipId(vipInfo.getId());
        SysProjUse queryUse = new SysProjUse();
        queryUse.setVipId(vipInfo.getId());
        queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_XM);
        queryUse.setTaocanId(-1L);
        queryUse.setStatus(Dictionary.TAOCAN_STATUS_YX);
        queryUse.setIsOver(Dictionary.FLAG_NO_N);
        List<SysProjUse> projList = projUseService.findInPage(queryUse, null);
        List<ServiceProjVo> serviceProjVos = SysProjUseMapper.INSTANCE.entityListToProjVoList(projList);
        queryUse.setTaocanId(null);
        queryUse.setType(Dictionary.SHOPPING_GOODS_TYPE_TC);
        List<SysProjUse> taoCanList = projUseService.findInPage(queryUse, null);
        List<ServiceTcVo> serviceTcVos = SysProjUseMapper.INSTANCE.entityListToTcVoList(taoCanList);
        if (CollectionUtils.isNotEmpty(serviceTcVos)) {
            serviceTcVos.forEach(item -> {
                List<SysProjUse> sysProjUses = projUseService.selectTaocanProjUse(item.getId());
                List<ServiceProjVo> taocanProj = SysProjUseMapper.INSTANCE.entityListToProjVoList(sysProjUses);
                item.setProj(taocanProj);
            });
                }
            } else {
                userProjInfoList.add(coversion(sysProjUseList.get(i)));
            }
        }
        AjaxResult result = new AjaxResult();
        result.setStatus("200");
        result.setMapInfo(taocanProjMap);
        result.setRows(userProjInfoList);
        return result;
        productListVo.setProj(serviceProjVos);
        productListVo.setComposeProj(serviceTcVos);
        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功");
        ajaxResult.putInMap("proj", productListVo);
        return ajaxResult;
    }
@@ -253,21 +267,55 @@
    AjaxResult createServiceOrder(@RequestBody Onlinebooking onlinebooking) {
        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
        bizUser = bizUserDao.findByOpenId(bizUser.getOpenId());
        SysVipInfo vipInfo = vipDap.selectByPhone(bizUser.getPhoneNumber());
        onlinebooking.setOrderNo(codeService.getServiceOrderCode());
        onlinebooking.setVipName(vipInfo.getVipName());
        onlinebooking.setVipId(vipInfo.getId());
        onlinebooking.setBizUserId(bizUser.getOpenId());
        onlinebooking.setStatus(Dictionary.ONLINEBOOKING_DFW);
        onlinebooking.setCreateTime(new Date());
        onlinebooking.setTime(DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM));
        onlinebookingDao.insert(onlinebooking);
        //发送消息通知
        JSONObject msg = new JSONObject();
        msg.put("templateMsgType", TemplateMsgType.APPOINTMENT_SUCCESS.getCode());
        msg.put("content", onlinebooking.getId());
        rabiitMqTemplate.sendMsg(MQTaskRouting.SEND_TEMPLATE_MSG+evn, msg.toJSONString());
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(onlinebooking));
        SysVipInfo vipInfo = vipInfoDao.selectByPhone(bizUser.getPhoneNumber());
        SysProjUse sysProjUse = projUseDao.selectById(Long.parseLong(onlinebooking.getProductId() + ""));
        Date yyTime = DateUtil.stringToDate(onlinebooking.getTimeStr(), DateUtil.DATE_FORMAT_MM);
        SysProjServices sysProjServices = new SysProjServices();
        sysProjServices.setCompanyId(vipInfo.getCompanyId());
        sysProjServices.setShopId(onlinebooking.getShopId());
        sysProjServices.setVipId(vipInfo.getId());
        sysProjServices.setYyTime(yyTime);
        sysProjServices.setRemark(onlinebooking.getRemark());
        List<SysBeauticianState> sysBeauticianStates = new ArrayList<>();
        SysBeauticianState sysBeauticianState = new SysBeauticianState();
        sysBeauticianState.setPuseId(sysProjUse.getId());
        sysBeauticianState.setProjUse(sysProjUse);
        sysBeauticianState.setCount(1);
        sysBeauticianState.setBeginTime(yyTime);
        int timeLength=30;
        if(sysProjUse.getTimeLength()!=null){
            timeLength=sysProjUse.getTimeLength();
        }
        sysBeauticianState.setEndTime(DateUtil.getDateAfterMinute(yyTime, timeLength));
        if(onlinebooking.getStaffId()!=null){
            sysBeauticianState.setStaffId(Long.parseLong(onlinebooking.getStaffId()+""));
        }
        sysBeauticianStates.add(sysBeauticianState);
        sysProjServices.setServiceItems(sysBeauticianStates);
        //检测欠款
        VerifyResult arrearsVerifyResult = projServicesService.checkArrears(sysProjServices);
        if (arrearsVerifyResult.isError()) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, arrearsVerifyResult.getMsg());
        }
        //检测余次
        VerifyResult balanceverifyResult = projServicesService.checkBalance(sysProjServices);
        if (balanceverifyResult.isError()) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, balanceverifyResult.getMsg());
        }
        sysProjServices.setState(Dictionary.SERVICE_STATU_DQR);
        SysProjServices newSysProjServices = projServicesService.addSysProjServices(sysProjServices);
        if (newSysProjServices != null) {
            return AjaxResult.buildSuccessInstance("下单成功");
        } else {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "下单失败!");
        }
    }
@@ -279,50 +327,43 @@
     */
    @RequestMapping(value = "/getServiceOrderById/{id}")
    public @ResponseBody
    AjaxResult getServiceOrderById(@PathVariable Long id) {
        Onlinebooking onlinebooking = onlinebookingDao.selectById(id);
        ShopProduct shopProduct = productDao.selectById(onlinebooking.getProductId());
        onlinebooking.setShopProduct(shopProduct);
        if (onlinebooking.getStaffId() != null) {
            SysUsers shopstaffInfo = staffInfoDao.selectById(Long.parseLong(onlinebooking.getStaffId() + ""));
            onlinebooking.setStaffInfo(shopstaffInfo);
    AjaxResult getServiceOrderById(@PathVariable("id") Long id) {
        SysProjServices projServices = projServicesService.findById(id);
        if (projServices == null) {
            return AjaxResult.buildFailInstance("服务单不存在");
        }
        SysShopInfo shopInfo = shopInfoDao.selectById(onlinebooking.getShopId());
        onlinebooking.setShopInfo(shopInfo);
        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "查询成功");
        result.putInMap("serviceOrder", onlinebooking);
        return result;
        ServiceOrderDetailVo detailVo = SysProjServiceMapper.INSTANCE.projServiceToDetailVo(projServices);
        List<SysBeauticianState> beauticianStates = sysBeauticianStateService.findBySerId(projServices.getId());
        List<ServiceOrderDetailItemVo> items = SysBeauticianStateMapper.INSTANCE.entitiesToDetailItemsVo(beauticianStates);
        detailVo.setItems(items);
        AjaxResult ajaxResult = AjaxResult.buildSuccessInstance("获取成功");
        ajaxResult.putInMap("detail", detailVo);
        ajaxResult.putInMap("shopInfo", shopInfoDao.selectById(projServices.getShopId()));
        return ajaxResult;
    }
    /**
     * 订单列表查询
     *
     * 查询服务单
     * @param orderListDto
     * @return
     */
    @RequestMapping(value = "/getServiceOrderList")
    public @ResponseBody
    AjaxResult getServiceOrderList(@RequestBody Onlinebooking onlinebooking) {
    @PostMapping(value = "/getServiceOrderList")
    @ResponseBody
    public AjaxResult findServiceOrderList(@RequestBody @Validated ServiceOrderListDto orderListDto) {
        BizUser bizUser = redisUserLoginUtils.getLoginUser(BizUser.class);
        onlinebooking.setBizUserId(bizUser.getOpenId());
        List<Onlinebooking> list = onlinebookingDao.selectInPageForWx(onlinebooking);
        //相关数据赋值
        list.stream().forEach(order -> {
            ShopProduct shopProduct = productDao.selectById(order.getProductId());
            order.setShopProduct(shopProduct);
            if (order.getStaffId() != null) {
                SysUsers shopstaffInfo = staffInfoDao.selectById(Long.parseLong(order.getStaffId() + ""));
                order.setStaffInfo(shopstaffInfo);
            }
            SysShopInfo shopInfo = shopInfoDao.selectById(order.getShopId());
            order.setShopInfo(shopInfo);
        });
        AjaxResult result = new AjaxResult(AjaxResult.STATUS_SUCCESS, "查询成功");
        result.setRows(list);
        return result;
    }
        SysVipInfo vipInfo= vipInfoDao.selectByPhone(bizUser.getPhoneNumber());
        PaginationVO pageVo = new PaginationVO();
        int offset = (orderListDto.getPageNum() - 1) * orderListDto.getPageSize();
        int limit = orderListDto.getPageSize();
        pageVo.setOffset(offset);
        pageVo.setLimit(limit);
        orderListDto.setVipId(vipInfo.getId());
        List<ServiceOrderListVo> apiServiceOrderListInPage = projServicesService.findApiServiceOrderListInPage(orderListDto, pageVo);
        return AjaxResult.buildSuccessInstance(apiServiceOrderListInPage, projServicesService.findApiServiceOrderListTotal(orderListDto));
    }
    /**
     * 取消预约订单
@@ -330,40 +371,24 @@
     * @param
     * @return
     */
    @RequestMapping(value = "/cancelOrderById")
    @RequestMapping(value = "/cancelOrderById/{id}")
    public @ResponseBody
    AjaxResult cancelOrderById(@RequestBody Onlinebooking onlinebooking) {
    AjaxResult cancelOrderById(@PathVariable("id") Long id) {
        AjaxResult result = new AjaxResult();
        if (onlinebooking.getId() == null) {
            result.setStatus(AjaxResult.STATUS_FAIL);
            result.setInfo("请求参数错误");
        SysProjServices services = new SysProjServices();
        services.setId(id);
        int i = projServicesService.modifyCancelProjServices(services);
        if (i > 0) {
            return new AjaxResult(AjaxResult.STATUS_SUCCESS, "取消预约成功");
        } else {
            onlinebooking.setStatus(Dictionary.ONLINEBOOKING_YQX);
            onlinebookingDao.update(onlinebooking);
            result.setStatus(AjaxResult.STATUS_SUCCESS);
            result.setInfo("订单取消成功");
        }
        return result;
            return new AjaxResult(AjaxResult.STATUS_FAIL, "取消预约失败");
    }
    /**
     * 删除订单
     *
     * @param
     * @return
     */
    @RequestMapping(value = "/removeOrderById/{id}")
    public @ResponseBody
    AjaxResult removeOrderById(@PathVariable Long id) {
        onlinebookingDao.deleteById(id);
        AjaxResult result = new AjaxResult();
        result.setStatus(AjaxResult.STATUS_SUCCESS);
        result.setInfo("删除成功");
        return result;
    }
    private UserProjInfo coversion(SysProjUse pUse) {
        UserProjInfo projInfo = new UserProjInfo();
        projInfo.setId(pUse.getId());
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml
@@ -468,6 +468,7 @@
        <result property="timeLength" column="timeLength" />
        <result property="status" column="status" />
        <result property="createStaffId" column="createStaffId" />
        <result property="shopName" column="shop_short_name" />
        <collection property="projs" ofType="com.matrix.system.app.vo.ServiceOrderListProjVo">
            <result property="projName" column="projName" />
            <result property="beautyName" column="beautyName" />
@@ -489,7 +490,8 @@
           e.id vipId,
           b.staff_id staffId,
           f.su_name beautyName,
           g.proj_name projName
           g.proj_name projName,
           h.shop_short_name
        from sys_proj_services a
        left join sys_beautician_state b on a.ID=b.SERVICES_ID
        left join sys_bed_state c on a.ID = c.SERVICE_ID
@@ -497,9 +499,13 @@
        left join sys_vip_info e on a.VIP_ID=e.ID
        left join sys_users f on f.su_id=b.STAFF_ID
        left join sys_proj_use g on b.puse_id=g.ID
        left join sys_shop_info h on a.SHOP_ID=h.ID
        <where>
            <if test="record.queryKey != null and record.queryKey != ''">
                and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) )
            </if>
            <if test="record.vipId != null and record.vipId != ''">
                and a.vip_id = #{record.vipId}
            </if>
            <if test="record.status != null and record.status != ''">
                and a.state = #{record.status}
@@ -510,6 +516,23 @@
            <if test="record.userId!=null">
                and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId})
            </if>
            <if test="record.vipStatus != null and record.vipStatus != '' and record.vipStatus!=0 ">
                <if test="record.vipStatus == 1">
                    and a.state = '待确认'
                </if>
                <if test="record.vipStatus == 2">
                    and a.state in ( '预约成功待处理' ,'需配料','配料完成','服务中')
                </if>
                <if test="record.vipStatus == 3">
                    and ( a.state in ( '服务完成' ,'服务单结束') and a.comment is  null)
                </if>
                <if test="record.vipStatus == 4">
                    and a.comment is not null
                </if>
                <if test="record.vipStatus == 5">
                    and a.state = '预约取消'
                </if>
            </if>
        </where>
        <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 -->
            order by a.yy_time desc
zq-erp/src/main/resources/mybatis/mapper/hive/SysProjUseDao.xml
@@ -510,10 +510,13 @@
    <!-- 根据id查询 -->
    <select id="selectById" resultMap="SysProjUseMap">
        select  *
        from sys_proj_use
        select a.*,
        b.TIME_LENGTH,
        b.img
        from sys_proj_use a
        left join shopping_goods b on a.proj_id=b.id
        where
        id=#{id}
        a.id=#{id}
    </select>
    <!-- 根据id查询 -->
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopWxtemplateMsgDao.xml
@@ -221,7 +221,18 @@
    <!-- 分页查询 -->
    <select id="selectInPage" resultMap="ShopWxtemplateMsgMap">
        select 
        <include refid="columns" ></include>
        create_by,
        create_time,
        update_by,
        update_time,
        id,
        name,
        uuid,
        status,
        remark,
        company_id,
        code,
        temp_type
        from shop_wxtemplate_msg
        <where>
          <include refid="where_sql"></include>
zq-erp/src/main/resources/templates/views/admin/shop/templateMsg-form.html
@@ -36,6 +36,19 @@
                       th:value="${obj.uuid}"nullmsg="模板id不能为空">
            </div>
        </div>
            <div class="form-group">
                <label class="col-sm-2 control-label">类型
                    <span class="text-danger">*</span>
                </label>
                <div class="col-sm-4">
                    <select class="form-control" dataType="*" nullmsg="请选择状态" name="tempType">
                        <option value='1' th:if="${obj.tempType == 1}" selected>公众号</option>
                        <option value='1' th:unless="${obj.tempType == 1}">公众号</option>
                        <option value='2' th:if="${obj.tempType == 2}" selected>小程序</option>
                        <option value='2' th:unless="${obj.tempType == 2}">小程序</option>
                    </select>
                </div>
            </div>
        <div class="form-group">