jyy
2021-03-18 bd276223343b32723e469f2e6e3f414572502b4b
修改bug7
7 files modified
471 ■■■■ changed files
zq-erp/src/main/java/com/matrix/ZqErpApplication.java 3 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java 20 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java 18 ●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java 404 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java 11 ●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/config/db/increment/推广员.sql 13 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml 2 ●●●●● patch | view | raw | blame | history
zq-erp/src/main/java/com/matrix/ZqErpApplication.java
@@ -3,6 +3,7 @@
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * spring boot入口
@@ -10,9 +11,7 @@
 * @author jiangyouyao
 */
@SpringBootApplication
@ComponentScan(basePackages = {"com.matrix.**"})
public class ZqErpApplication {
    public static void main(String[] args) {
zq-erp/src/main/java/com/matrix/system/shopXcx/action/ShopBizUserScoreAction.java
@@ -1,25 +1,10 @@
package com.matrix.system.shopXcx.action;
import com.matrix.biz.bean.BizUser;
import com.matrix.biz.service.BizUserService;
import com.matrix.core.anotations.RemoveRequestToken;
import com.matrix.core.anotations.SaveRequestToken;
import com.matrix.core.constance.MatrixConstance;
import com.matrix.core.pojo.AjaxResult;
import com.matrix.core.tools.StringUtils;
import com.matrix.core.tools.WebUtil;
import com.matrix.system.common.bean.SysUsers;
import com.matrix.system.shopXcx.bean.ShopScoreExchange;
import com.matrix.system.shopXcx.dao.ShopScoreExchangeDao;
import com.matrix.system.shopXcx.pojo.ExchangeScorePOJO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.servlet.ModelAndView;
import java.util.Date;
/**
@@ -40,11 +25,6 @@
     * 记录编辑前的值Before_Edit_Value
     */
    public static final String BEV = "ShopBizUserScore_BEV";
\
}
zq-erp/src/main/java/com/matrix/system/shopXcx/api/action/WxUserAction.java
@@ -168,7 +168,14 @@
        // TODO 赋值操作
        int i = bizUserService.saveUserInfo(bizUser);
        checkNeedToBeSalesman(bizUser, loginUser);
        if (i == 0) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败");
        }
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(bizUser));
    }
    void checkNeedToBeSalesman(BizUser bizUser, BizUser loginUser) {
        //查询是否需要自动成为分销员
        if ((loginUser.getIsSales() == null || loginUser.getIsSales() == 2)
                && StringUtils.isNotBlank(bizUser.getNickName())) {//目前还不是分销员
@@ -181,15 +188,16 @@
                    queryWrapper.eq("apply_status", ShopSalesmanApply.APPLY_STATUS_DSH);
                    ShopSalesmanApply shopSalesmanApply = salesmanApplyDao.selectOne(queryWrapper);
                    if (shopSalesmanApply == null) {//没有待审核记录
                        shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getOpenId(), null, null, 2);
                        try {
                            shopSalesmanApplyService.applyToBeAnSalesman(loginUser.getOpenId(), null, null, 2);
                        }catch (Exception e){
                            LogUtil.debug(e.getMessage());
                        }
                    }
                }
            }
        }
        if (i == 0) {
            return new AjaxResult(AjaxResult.STATUS_FAIL, "更新失败");
        }
        return new AjaxResult(AjaxResult.STATUS_SUCCESS, Collections.singletonList(bizUser));
    }
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopProduct.java
@@ -2,6 +2,7 @@
import com.matrix.core.anotations.Extend;
import com.matrix.system.common.bean.EntityDTOExt;
import lombok.Data;
import java.util.List;
@@ -10,13 +11,27 @@
 * @author jyy
 * @date 2019-06-10 10:58
 */
@Data
public class ShopProduct extends EntityDTOExt {
    /**
     * 产品类型-服务
     * 卖场-微商城
     */
    public static  final int IS_SERVICE_Y=1;
    public static  final int IS_SERVICE_N=2;
    public static  final int MALL_MICRO =1;
    /**
     * 卖场-积分商城
     */
    public static  final int MALL_SCORE=2;
    /**
     * 可分销
     */
    public static  final int ABLE_SALES =1;
    /**
     * 不可分销
     */
    public static  final int NOT_ABLE_SALES=2;
    
    /**
     * 主键
@@ -28,7 +43,12 @@
     * 分类ID
     */
    private Integer  categoryId;
    /**
     * 积分商城分类ID
     */
    private Integer  scoreCategoryId;
    
    /**
     * 标题
@@ -58,10 +78,17 @@
     * 手机端封面
     */
    private String  imgMobile;
    /**
     * 上架卖场 1 微商城,2 积分商城
     */
    private Integer  mallType;
    /**
     * 是否为分销产品 1是2不是
     */
    private Integer  ableSales;
    
    /**
     * 原价
@@ -161,6 +188,7 @@
     */
    @Extend
    private String  paramRefs;
    @Extend
    private List<ShopProductParamRef> params;
@@ -246,366 +274,4 @@
    public Long getCompanyId() {
        return companyId;
    }
    public void setCompanyId(Long companyId) {
        this.companyId = companyId;
    }
    public String getBrand() {
        return brand;
    }
    public void setBrand(String brand) {
        this.brand = brand;
    }
    public String getShopIds() {
        return shopIds;
    }
    public void setShopIds(String shopIds) {
        this.shopIds = shopIds;
    }
    public ShopCoupon getShopCoupon() {
        return shopCoupon;
    }
    public void setShopCoupon(ShopCoupon shopCoupon) {
        this.shopCoupon = shopCoupon;
    }
    public Integer getCouponId() {
        return couponId;
    }
    public void setCouponId(Integer couponId) {
        this.couponId = couponId;
    }
    public String getStockNum() {
        return stockNum;
    }
    public void setStockNum(String stockNum) {
        this.stockNum = stockNum;
    }
    public Integer getIsService() {
        return isService;
    }
    public void setIsService(Integer isService) {
        this.isService = isService;
    }
    public Integer getIsSpecialPrice() {
        return isSpecialPrice;
    }
    public void setIsSpecialPrice(Integer isSpecialPrice) {
        this.isSpecialPrice = isSpecialPrice;
    }
    public Double getMarkedPrice() {
        return markedPrice;
    }
    public void setMarkedPrice(Double markedPrice) {
        this.markedPrice = markedPrice;
    }
    public Integer getId() {
        return id;
    }
       public void setId(Integer id) {
        this.id=id;
    }
    public Integer getCategoryId() {
        return categoryId;
    }
       public void setCategoryId(Integer categoryId) {
        this.categoryId=categoryId;
    }
    public String getTitle() {
        return title;
    }
       public void setTitle(String title) {
        this.title=title;
    }
    public String getBriefIntroduction() {
        return briefIntroduction;
    }
       public void setBriefIntroduction(String briefIntroduction) {
        this.briefIntroduction=briefIntroduction;
    }
    public Integer getCarriage() {
        return carriage;
    }
       public void setCarriage(Integer carriage) {
        this.carriage=carriage;
    }
    public String getImgPc() {
        return imgPc;
    }
       public void setImgPc(String imgPc) {
        this.imgPc=imgPc;
    }
    public String getImgMobile() {
        return imgMobile;
    }
       public void setImgMobile(String imgMobile) {
        this.imgMobile=imgMobile;
    }
    public Double getPrice() {
        return price;
    }
       public void setPrice(Double price) {
        this.price=price;
    }
    public String getPcDetails() {
        return pcDetails;
    }
       public void setPcDetails(String pcDetails) {
        this.pcDetails=pcDetails;
    }
    public String getMobileDetails() {
        return mobileDetails;
    }
       public void setMobileDetails(String mobileDetails) {
        this.mobileDetails=mobileDetails;
    }
    public Integer getBuyLimit() {
        return buyLimit;
    }
       public void setBuyLimit(Integer buyLimit) {
        this.buyLimit=buyLimit;
    }
    public Integer getLimitCycle() {
        return limitCycle;
    }
       public void setLimitCycle(Integer limitCycle) {
        this.limitCycle=limitCycle;
    }
    public Integer getIsCanComment() {
        return isCanComment;
    }
       public void setIsCanComment(Integer isCanComment) {
        this.isCanComment=isCanComment;
    }
    public String getMnemonicCode() {
        return mnemonicCode;
    }
       public void setMnemonicCode(String mnemonicCode) {
        this.mnemonicCode=mnemonicCode;
    }
    public Integer getStatus() {
        return status;
    }
       public void setStatus(Integer status) {
        this.status=status;
    }
    public Integer getDsVolume() {
        return dsVolume;
    }
       public void setDsVolume(Integer dsVolume) {
        this.dsVolume=dsVolume;
    }
    public Integer getRsVolume() {
        return rsVolume;
    }
       public void setRsVolume(Integer rsVolume) {
        this.rsVolume=rsVolume;
    }
    public Integer getDelFlag() {
        return delFlag;
    }
       public void setDelFlag(Integer delFlag) {
        this.delFlag=delFlag;
    }
    public String getParamRefs() {
        return paramRefs;
    }
    public void setParamRefs(String paramRefs) {
        this.paramRefs = paramRefs;
    }
    public String getAttrs() {
        return attrs;
    }
    public void setAttrs(String attrs) {
        this.attrs = attrs;
    }
    public String getShopSku() {
        return shopSku;
    }
    public void setShopSku(String shopSku) {
        this.shopSku = shopSku;
    }
    public String getShopProductImg() {
        return shopProductImg;
    }
    public void setShopProductImg(String shopProductImg) {
        this.shopProductImg = shopProductImg;
    }
    public List<ShopProductParamRef> getParams() {
        return params;
    }
    public void setParams(List<ShopProductParamRef> params) {
        this.params = params;
    }
    public List<ShopProductAttrRef> getAttrRefs() {
        return attrRefs;
    }
    public void setAttrRefs(List<ShopProductAttrRef> attrRefs) {
        this.attrRefs = attrRefs;
    }
    public List<ShopSku> getSkus() {
        return skus;
    }
    public void setSkus(List<ShopSku> skus) {
        this.skus = skus;
    }
    public List<ShopProductImg> getProductImgs() {
        return productImgs;
    }
    public void setProductImgs(List<ShopProductImg> productImgs) {
        this.productImgs = productImgs;
    }
    public Integer getStartPrice() {
        return startPrice;
    }
    public void setStartPrice(Integer startPrice) {
        this.startPrice = startPrice;
    }
    public Integer getEndPrice() {
        return endPrice;
    }
    public void setEndPrice(Integer endPrice) {
        this.endPrice = endPrice;
    }
    public String getSortType() {
        return sortType;
    }
    public void setSortType(String sortType) {
        this.sortType = sortType;
    }
    public String getQueryType() {
        return queryType;
    }
    public void setQueryType(String queryType) {
        this.queryType = queryType;
    }
    public String getAttrValues() {
        return attrValues;
    }
    public void setAttrValues(String attrValues) {
        this.attrValues = attrValues;
    }
    public String getAtrid() {
        return atrid;
    }
    public void setAtrid(String atrid) {
        this.atrid = atrid;
    }
    public String getScore() {
        return score;
    }
    public Integer getServiceTime() {
        return serviceTime;
    }
    public void setServiceTime(Integer serviceTime) {
        this.serviceTime = serviceTime;
    }
    public void setScore(String score) {
        this.score = score;
    }
}
zq-erp/src/main/java/com/matrix/system/shopXcx/bean/ShopSku.java
@@ -12,7 +12,7 @@
 */
public class ShopSku  extends EntityDTO{
    @Extend
    private static final long serialVersionUID = 1L;
    private static final long serialVersionUID = 1L;
    
    /**
@@ -59,11 +59,18 @@
    private BigDecimal invitationPrice;
    /**
     * 积分
     * 消费可得积分
     */
    private Integer score;
    /**
     * 积分兑换价格
     */
    private Integer scorePrice;
    /**
     * 排序
     */
    private Integer  sort;
zq-erp/src/main/resources/config/db/increment/推广员.sql
@@ -180,3 +180,16 @@
PRIMARY KEY(id)
)ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='分销订单';
biz_user原来的userId改成了自增长的bigint
ALTER TABLE `shop_sku`
    ADD COLUMN `score_price` decimal(10, 2) NULL COMMENT '积分兑换价格' AFTER `invitation_price`;
ALTER TABLE `shop_product`
    ADD COLUMN `score_category_id` bigint(20) NULL COMMENT '积分商城分类ID' AFTER `company_id`,
ADD COLUMN `able_sales` int(2) NULL COMMENT '是否为分销产品' AFTER `score_category_id`,
ADD COLUMN `mall_type` int(2) NULL COMMENT '上架卖场' AFTER `able_sales`;
zq-erp/src/main/resources/mybatis/mapper/xcxShop/ShopProductDao.xml
@@ -42,6 +42,8 @@
        <result property="couponId" column="couponId"></result>
        <result property="serviceTime" column="service_time"></result>
        <result property="companyId" column="company_id"/>
        <association property="shopCoupon" select="com.matrix.system.shopXcx.dao.ShopCouponDao.selectById"
                     column="{id=couponId}"></association>
    </resultMap>