935090232@qq.com
2022-04-24 14f20daccada2ebe169a45a326e13f4744683716
Merge remote-tracking branch 'origin/score_shop' into developer
13 files modified
1 files added
201 ■■■■ changed files
zq-erp/src/main/java/com/matrix/system/app/action/ApiServiceOrderAction.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/action/AppOccupancyController.java 21 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/CreateServiceOrderDto.java 11 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/app/dto/FreeBedDto.java 43 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/authority/strategy/AccountPasswordLogin.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java 3 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java 1 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java 11 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java 28 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java 28 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/service/impl/WxShopActivitiesSecKillServiceImpl.java 4 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/application-alpha.properties 45 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/application.properties 2 ●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/prd/system.properties 2 ●●● patch | view | raw | blame | history
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/common/authority/strategy/AccountPasswordLogin.java
@@ -110,6 +110,7 @@
            throw new GlobleException(AppMessageCode.User.ACCOUNT_IS_LOCK);
        } else {
            addErrorLoginRecord(loginUser, AppConstance.LOGIN_FAIL);
            throw new GlobleException(AppMessageCode.User.ACCOUNT_PASSWORD_ERROR, sessionErrorTimes, sessionErrorTimes, 5);
        }
zq-erp/src/main/java/com/matrix/system/common/service/impl/SysUsersServiceImpl.java
@@ -9,6 +9,7 @@
import com.matrix.core.tools.LogUtil;
import com.matrix.core.tools.ModelUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.app.authority.AppAuthorityManager;
import com.matrix.system.common.authority.DefaultAuthorityManager;
import com.matrix.system.common.bean.SysUserLoginRecord;
import com.matrix.system.common.bean.SysUsers;
@@ -134,8 +135,10 @@
        //删除用户权限缓存
        String redisKey=DefaultAuthorityManager.USER_POWER_REDISKEY+ SecureUtil.md5(oldSysUsers.getSuId()+"");
        String redisKeyPc=DefaultAuthorityManager.USER_POWER_REDISKEY_PC+ SecureUtil.md5(oldSysUsers.getSuId()+"");
        String appRedisKey = AppAuthorityManager.USER_POWER_REDISKEY_APP + SecureUtil.md5(oldSysUsers.getSuId()+"");
        LocalCache.remove(redisKey);
        LocalCache.remove(redisKeyPc);
        LocalCache.remove(appRedisKey);
        return MatrixConstance.DML_SUCCESSS;
    }
zq-erp/src/main/java/com/matrix/system/hive/action/OrderController.java
@@ -218,6 +218,7 @@
        if (!DataAuthUtil.hasAllShopAuth()) {
            sysOrder.setShopId(getMe().getShopId());
        }
        sysOrder.setCompanyId(getMe().getCompanyId());
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, orderService.findInPage(sysOrder, pageVo),
                orderService.findTotal(sysOrder));
    }
zq-erp/src/main/java/com/matrix/system/hive/action/ProjUseController.java
@@ -248,8 +248,15 @@
//       String dirPath = "E:";
       String dirPath =  fileStoragePath;
        File saveFile = new File(dirPath + "/" + fileName);
        file.transferTo(saveFile);
        File saveFile =new File (new File(dirPath).getAbsolutePath() + File.separator + fileName);
        if (!saveFile.exists())
        {
            if (!saveFile.getParentFile().exists())
            {
                saveFile.getParentFile().mkdirs();
            }
        }
        file.transferTo(saveFile.getAbsoluteFile());
        SysUsers sysUsers = WebUtil.getSessionAttribute(MatrixConstance.LOGIN_KEY);
zq-erp/src/main/java/com/matrix/system/hive/service/imp/SysProjServicesServiceImpl.java
@@ -253,9 +253,13 @@
        sysProjServices.setTotalTime(totalTime);
        sysProjServices.setMoney(new BigDecimal(hkPrice).setScale(2, BigDecimal.ROUND_HALF_DOWN).doubleValue());
        sysProjServicesDao.update(sysProjServices);
        //jyytodo 小程序订单没有操作人
        Long userId=0L;
        if(user!=null){
            userId=  user.getSuId();
        }
        //保存单据日志
        operationLogService.saveOperation(sysProjServices.getCompanyId(), sysProjServices.getShopId(),user.getSuId(),
        operationLogService.saveOperation(sysProjServices.getCompanyId(), sysProjServices.getShopId(),userId,
                OperationFunctionEnum.SERVICE_ORDER,
                OperationButtonEnum.CREATE,
                sysProjServices.getId(),
@@ -650,11 +654,11 @@
                    taocanProjUse.setIsOver(Dictionary.DELETED_N);
                    taocanProjUse.setStatus(Dictionary.MONEYCARD_STATUS_YX);
                    taocanProjUse.setBalance(MoneyUtil.add(taocanProjUse.getBalance(), backBlance.doubleValue()));
                    if (Dictionary.FLAG_YES_Y.equals(taocanProjUse.getIsCourse())) {
                        if (StringUtils.isBlank(taocanProjUse.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocanProjUse.getIsInfinite())) {
                            taocanProjUse.setSurplusCount(taocanProjUse.getSurplusCount() + beauticianState.getCount());
                        }
//                    if (Dictionary.FLAG_YES_Y.equals(taocanProjUse.getIsCourse())) {
                    if (StringUtils.isBlank(taocanProjUse.getIsInfinite()) || Dictionary.FLAG_NO_N.equals(taocanProjUse.getIsInfinite())) {
                        taocanProjUse.setSurplusCount(taocanProjUse.getSurplusCount() + beauticianState.getCount());
                    }
//                    }
                    sysProjUseDao.update(taocanProjUse);
                }
@@ -793,15 +797,15 @@
        BusParameterSettings principalConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.PRINCIPAL_CONSUMPTION, vipInfo.getCompanyId());
        //本金消耗
        if (principalPrice > 0
                && StringUtils.isNotBlank(principalConsumption.getParamValue())) {
                && StringUtils.isNotBlank(principalConsumption.getParamValue()) && Double.parseDouble(principalConsumption.getParamValue()) > 0 ) {
            principalConsumScore[0] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue()));
            if (StringUtils.isNotBlank(principalConsumption.getParamValue1())) {
            if (StringUtils.isNotBlank(principalConsumption.getParamValue1()) && Double.parseDouble(principalConsumption.getParamValue1()) > 0 ) {
                principalConsumScore[1] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue1()));
            }
            if (StringUtils.isNotBlank(principalConsumption.getParamValue2())) {
            if (StringUtils.isNotBlank(principalConsumption.getParamValue2()) && Double.parseDouble(principalConsumption.getParamValue2()) > 0 ) {
                principalConsumScore[2] = (int) (principalPrice / Double.parseDouble(principalConsumption.getParamValue2()));
            }
        }
@@ -810,15 +814,15 @@
        BusParameterSettings giveConsumption = busParameterSettingsDao.selectCompanyParamByCode(ScoreSettingConstant.GIVE_CONSUMPTION, vipInfo.getCompanyId());
        //本金消耗
        if (giftPrice > 0
                && StringUtils.isNotBlank(giveConsumption.getParamValue())) {
                && StringUtils.isNotBlank(giveConsumption.getParamValue()) &&  Double.parseDouble(giveConsumption.getParamValue())>0) {
            giveConsumScore[0] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue()));
            if (StringUtils.isNotBlank(giveConsumption.getParamValue1())) {
            if (StringUtils.isNotBlank(giveConsumption.getParamValue1()) && Double.parseDouble(giveConsumption.getParamValue1())>0) {
                giveConsumScore[1] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue1()));
            }
            if (StringUtils.isNotBlank(giveConsumption.getParamValue2())) {
            if (StringUtils.isNotBlank(giveConsumption.getParamValue2()) && Double.parseDouble(giveConsumption.getParamValue2())>0 ) {
                giveConsumScore[2] = (int) (giftPrice / Double.parseDouble(giveConsumption.getParamValue2()));
            }
        }
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -158,6 +158,7 @@
    @RequestMapping(value = "/findUserInfo")
    public @ResponseBody
    AjaxResult findUserInfo() {
        AjaxResult res = new AjaxResult();
        SysVipInfo loginUser = userCacheManager.getLoginUser();
        SysVipInfo sysVipInfo = sysVipInfoService.findById(loginUser.getId());
@@ -169,20 +170,19 @@
                sysVipInfo.setBalance(0D);
                sysVipInfo.setPointAll(0);
            }
        }
        AjaxResult res = new AjaxResult();
        res.putInMap("couponCount", shopCouponRecordDao.countUnuseCouponRecord(loginUser.getId()));
        res.putInMap("prizeCount", activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(), loginUser.getCompanyId()));
        res.putInMap("userInfo", sysVipInfo);
        //查询会员等级
        if (sysVipInfo.getSalesmanGrade() != null) {
            ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade());
            res.putInMap("vipLevel", shopSalesmanGrade.getName());
        } else if (sysVipInfo.getVipLevel() != null) {
            res.putInMap("vipLevel", sysVipInfo.getVipLevel().getLevelName());
        } else {
            res.putInMap("vipLevel", "初级会员");
            res.putInMap("couponCount", shopCouponRecordDao.countUnuseCouponRecord(loginUser.getId()));
            res.putInMap("prizeCount", activitySignReceiveRecordDao.getSignAwardReceiveCount(loginUser.getId(), loginUser.getCompanyId()));
            res.putInMap("userInfo", sysVipInfo);
            //查询会员等级
            if (sysVipInfo.getSalesmanGrade() != null) {
                ShopSalesmanGrade shopSalesmanGrade = shopSalesmanGradeDao.selectById(sysVipInfo.getSalesmanGrade());
                res.putInMap("vipLevel", shopSalesmanGrade.getName());
            } else if (sysVipInfo.getVipLevel() != null) {
                res.putInMap("vipLevel", sysVipInfo.getVipLevel().getLevelName());
            } else {
                res.putInMap("vipLevel", "初级会员");
            }
        }
        res.setStatus(AjaxResult.STATUS_SUCCESS);
        return res;
@@ -238,7 +238,7 @@
        if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2)
                && StringUtils.isNotBlank(sysVipInfo.getNickName())) {//目前还不是分销员
            BusParameterSettings fxSwith = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_SWITCH, HostInterceptor.getCompanyId());
            if (fxSwith!=null && fxSwith.getParamValue().equals("1")) {//开启分销
            if (fxSwith!=null && "1".equals(fxSwith.getParamValue())) {//开启分销
                BusParameterSettings applyWay = busParameterSettingsDao.selectCompanyParamByCode(FenxiaoSettingConstant.FX_APPLY_WAY, loginUser.getCompanyId());
                if (applyWay.getParamValue().equals(FenxiaoSettingConstant.FX_APPLY_WAY_AUTO)) {//自动成为分销员
                    QueryWrapper<ShopSalesmanApply> queryWrapper = new QueryWrapper<>();
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=ct_test
spring.datasource.password=123456
spring.datasource.url=jdbc:mysql://120.27.238.55:3306/hive_test?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
@@ -37,10 +37,11 @@
#rabbitMQ配置
rabbitmq.host=120.27.238.55
rabbitmq.host=47.111.134.136
rabbitmq.port=5672
rabbitmq.username=ct_rabbit
rabbitmq.password=123456
rabbitmq.username=hivequeue
rabbitmq.password=hivequeueadmin
useRabbit=true
server.session.timeout=120
@@ -61,7 +62,7 @@
#是否启用debug模式
debug=false
# 日志文件保存地址
log_path=/home/javaweb/hive/log
log_path=/mnt/hive/log
# 系统语言环境 zh中文,us英文
system_language=zh
@@ -72,9 +73,9 @@
default_password=123
#nginx静态资源访问地址
static_resource_url=http://120.27.238.55:8000/hive/static/uploadeFile/
static_resource_url=https://hive.file.csxuncong.com/uploadeFile/alpha/
#文件保存地址
file_storage_path=/home/javaweb/webresource/hive/static/uploadeFile/
file_storage_path=/mnt/hive/static/uploadeFile/alpha/
#文件上传大小字节为单位  10MB
maxUploadSize=10485760
@@ -119,6 +120,8 @@
wechar_login_url =https://api.weixin.qq.com/sns/jscode2session?appid=%s&secret=%s&js_code=%s&grant_type=authorization_code
xcx_appid =wx3836ab3c1490ff29
xcx_secret =39a3687ec5b2666ed68e7c8b83b26b47
xcx_manager_appid=wx0d5655a6443807d3
xcx_manager_secret=b04e675224437c4f17c3068b6c2377b6
#微信支付调试开关
wx_pay_debug_onoff = false
@@ -165,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/
zq-erp/src/main/resources/config/application.properties
@@ -1,5 +1,5 @@
spring.profiles.active=test
spring.profiles.active=meidu
evn=dev
server.port=8080
zq-erp/src/main/resources/config/prd/system.properties
@@ -95,7 +95,7 @@
platform_verity_url = http://stg1-xcerp-ca.xc.jyymatrix.cc/platform/getUserInfo
#微信支付回调地址
pay_notify_url = https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback
pay_notify_url=https://xcxhive2.jyymatrix.cc/wxCommon/wxpayCallback
qrcodeBackgroundImgPath=/mnt/xcshop/webresource/static/xcxresource/bj1.png