浏览代码

Merge remote-tracking branch 'origin/developerF' into developer

Duan_xu 2 年之前
父节点
当前提交
3f45336aed

+ 2 - 1
src/main/java/com/caimei365/commodity/controller/CouponApi.java

@@ -16,6 +16,7 @@ import org.apache.commons.lang3.StringUtils;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.web.bind.annotation.*;
 
+import java.text.ParseException;
 import java.util.Map;
 
 /**
@@ -101,7 +102,7 @@ public class CouponApi {
     @PostMapping("/collar")
     @IpSave(saveName = "领取优惠券",saveParams = true)
     @Idempotent(prefix = "idempotent_collarCoupons", keys = {"#couponsDto"}, expire = 5)
-    public ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto) {
+    public ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto) throws ParseException {
         if (couponsDto.getCouponId() == null || couponsDto.getSource() == null || couponsDto.getUserId() == null) {
             return ResponseJson.error("参数异常", null);
         }

+ 10 - 0
src/main/java/com/caimei365/commodity/feign/ToolsFeign.java

@@ -20,4 +20,14 @@ public interface ToolsFeign {
     @PostMapping("/tools/mq/send")
     String sendCommonMessage(@RequestParam String topic, @RequestParam String content, @RequestParam String tag, @RequestParam Integer sort, @RequestParam Integer async, @RequestParam Integer oneway, @RequestParam Integer delay);
 
+
+    /**
+     * 请求发短信接口
+     *
+     * @param mobile  手机号
+     * @param content 内容
+     * @return str
+     */
+    @PostMapping("/tools/sms/send")
+    String getSendSms(@RequestParam String mobile, @RequestParam String content);
 }

+ 29 - 0
src/main/java/com/caimei365/commodity/mapper/MessageCenterMapper.java

@@ -0,0 +1,29 @@
+package com.caimei365.commodity.mapper;
+
+import com.caimei365.commodity.model.vo.CouponVo;
+import com.caimei365.commodity.model.vo.MessageCenter;
+import com.caimei365.commodity.model.vo.UserVo;
+import org.apache.ibatis.annotations.Mapper;
+
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/7/7
+ */
+@Mapper
+public interface MessageCenterMapper {
+
+
+    void addMessageCenter(MessageCenter messageCenter);
+
+    Integer clubIdCule(Integer userId);
+
+    UserVo clubList(Integer userId);
+
+    CouponVo CouponList(Integer couponType);
+
+    String contractMobile(Integer userID);
+
+}

+ 49 - 3
src/main/java/com/caimei365/commodity/mapper/ShopMapper.java

@@ -23,138 +23,184 @@ public interface ShopMapper {
      */
     List<ProductListVo> getMainProducts(Integer shopId, List<Integer> visibilityList);
 
+    /**
+     * 上架费过期数量
+     */
+    Integer listingfeeExpire(Integer shopID);
+
+    /**
+     * 上架费数量
+     */
+    Integer listingFee(Integer shopID);
+    /**
+     * 是否有免除上架费
+     */
+    Integer receStatct(Integer shopID);
     /**
      * 主推商品数量
      */
     int getMainProductsCount(Integer shopId);
+
     /**
      * 获取供应商-我的商品列表
      */
-    List<ProductItemVo> getShopProductsSelect(Integer showFlag,Integer newvalidFlag,Integer shopId, String name, String productCode, Integer validFlag, Integer featuredFlag, Integer commodityType, Integer bigTypeId, Integer smallTypeId, Integer tinyTypeId);
+    List<ProductItemVo> getShopProductsSelect(Integer showFlag, Integer newvalidFlag, Integer shopId, String name, String productCode, Integer validFlag, Integer featuredFlag, Integer commodityType, Integer bigTypeId, Integer smallTypeId, Integer tinyTypeId);
+
     /**
      * 列表显示分类
      */
     String getTypeName(Integer bigTypeId, Integer smallTypeId, Integer tinyTypeId);
+
     /**
      * 根据供应商Id获取userId
      */
     Integer getUserIdByshopId(Integer shopId);
+
     /**
      * 根据分类获取商品货号
      */
     String getCodeByTypeId(Integer bigTypeId, Integer smallTypeId, Integer tinyTypeId);
+
     /**
      * 发布商品
      */
     void insertProduct(ProductPo product);
+
     /**
      * 编辑商品
      */
     void updateProduct(ProductPo product);
+
     /**
      * 获取商品图片
      */
     List<ProductImagePo> getImageByProductId(Integer productId);
+
     /**
      * 新增商品图片
      */
     void insertProductImage(ProductImagePo productImage);
+
     /**
      * 更新商品图片
      */
     void updateProductImage(ProductImagePo productImage);
+
     /**
      * 删除商品图片
      */
     void deleteProductImage(Integer id);
+
     /**
      * 删除相关参数
      */
     void deleteProductParameters(Integer productId);
+
     /**
      * 保存相关参数
      */
     void insertProductParameters(ProductParameterPo parameters);
+
     /**
      * 保存商品详情
      */
     void insertProductDetailInfo(ProductDetailInfoPo productDetail);
+
     /**
      * 修改商品详情
      */
     void updateProductDetailInfo(ProductDetailInfoPo productDetail);
+
     /**
      * 供应商-商品编辑回显
      */
     ProductFormVo getProductForm(Integer productId);
+
     /**
      * 获取品牌名称
      */
     String getBrandNameById(Integer brandId);
+
     /**
      * 获取相关参数
      */
     List<ProductParameterPo> getProductParameters(Integer productId);
+
     /**
      * 获取商品图片
      */
     List<ProductImagePo> getProductImages(Integer productId);
+
     /**
      * 获取商品详情
      */
     ProductDetailInfoPo getProductDetailInfo(Integer productId);
+
     /**
      * 供应商信息
      */
     ShopVo getProductShopById(Integer shopId);
+
     /**
      * 上架商品数量
      */
     Integer getProductNumById(Integer shopId);
+
     /**
      * 获取用户身份
      */
     Integer getUserIdentityById(Integer userId);
+
     /**
      * 供应商-商品编辑-品牌联想
      */
     List<BrandVo> getBrandAssociation(Integer userId, String name);
+
     /**
      * 供应商-商品编辑-品牌检测
      */
     BrandVo getBrandByName(String name);
+
     /**
      * 供应商-提交新品牌
      */
     void insertBrand(BrandPo brand);
+
     /**
      * 供应商-更新品牌
      */
     void updateBrand(BrandPo brand);
+
     /**
      * 供应商-品牌管理
      */
     List<BrandVo> getShopBrandList(String name, Integer status, Integer userId);
+
     /**
      * 供应商-添加,删除主页推荐
      */
     int updateProductFeatured(Integer productId, Integer shopId, Integer featuredFlag);
+
     /**
      * 供应商-下架商品
      */
     void updateProductValidFlag(Integer productId, Integer validFlag);
+
     /**
      * 供应商-更新商品编码
      */
     void updateProductCode(String productCode, Integer productId);
+
     /**
-     *  获取商品pc云上美博会活动状态
+     * 获取商品pc云上美博会活动状态
      */
     Integer getPcBeautyStatusById(Integer productId);
+
     /**
-     *  获取商品小程序云上美博会活动状态
+     * 获取商品小程序云上美博会活动状态
      */
     Integer getAppletsBeautyStatusById(Integer productId);
+
     /**
      * 获取供应商名称
      */

+ 56 - 0
src/main/java/com/caimei365/commodity/model/vo/MessageCenter.java

@@ -0,0 +1,56 @@
+package com.caimei365.commodity.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2022/7/7
+ */
+@Data
+public class MessageCenter implements Serializable {
+
+    /**
+    *消息id
+     */
+    private Integer id;
+    /**
+    供应商id
+     */
+    private Integer shopID;
+    /**
+    机构id
+     */
+    private Integer clubID;
+    /**
+   用户类型1.机构2.供应商
+     */
+    private Integer userType;
+    /**
+     消息类型1.交易物流2.账户通知3.服务通知4.优惠促销
+     */
+    private Integer messageType;
+    /**
+     * 消息内容
+     */
+    private String content;
+    /**
+     * 操作完成时间
+     */
+    private String time;
+    /**
+     *账户通知类型 1.注册成功通知 2.购买超级会员成功 3.超级会员到期提醒 4.超级会员到期提醒 5.升级资质机构成功 6.升级资质机构失败 7.成为机构运营人员通知
+     */
+    private Integer accountType;
+    /**
+     * 优惠券类型 1.优惠券待领取通知 2.优惠券过期通知
+     */
+    private Integer couponType;
+    /**
+     * 优惠券金额
+     */
+    private Double couponFee;
+}

+ 138 - 0
src/main/java/com/caimei365/commodity/model/vo/UserVo.java

@@ -0,0 +1,138 @@
+package com.caimei365.commodity.model.vo;
+
+import lombok.Data;
+
+import java.io.Serializable;
+import java.util.List;
+
+/**
+ * Description
+ *
+ * @author : Charles
+ * @date : 2021/3/15
+ */
+@Data
+public class UserVo implements Serializable {
+    /**
+     * 用户ID
+     */
+    private Integer userId;
+    /**
+     * 用户类型,供应商1,会员机构3,普通机构4
+     */
+    private Integer registerUserTypeId;
+    /**
+     * 注册来源: 0网站 1小程序
+     */
+    private Integer source;
+    /**
+     * 机构ID
+     */
+    private Integer clubId;
+    /**
+     * 供应商ID
+     */
+    private Integer shopId;
+    /**
+     * 协销Id
+     */
+    private Integer serviceProviderId;
+    /**
+     * 用户名
+     */
+    private String userName;
+    /**
+     * 邮箱
+     */
+    private String email;
+    /**
+     * 手机号码
+     */
+    private String mobile;
+    /**
+     * 企业绑定手机号
+     */
+    private String bindMobile;
+    /**
+     * 密码
+     */
+    private String password;
+    /**
+     * 用户身份: 1协销 2会员机构 3供应商 4普通机构
+     */
+    private Integer userIdentity;
+    /**
+     * 用户权限: 2会员机构 3供应商 4协销 5普通机构
+     */
+    private Integer userPermission;
+    /**
+     * 组织名称
+     */
+    private String name;
+    /**
+     * 机构状态:90:已上线,91:已冻结,92:审查资料未通过,待补充资料,1:待审查资料,2:电话预约,3:已预约,20:待确认,21:待拜访,30:待员工推荐,40:已完成第一次采购
+     */
+    private Integer clubStatus;
+    /**
+     * 供应商状态:90:已上线,91:已下线,92:审核不通过,3:待审核
+     */
+    private Integer manufacturerStatus;
+    /**
+     * 协销状态:90:已上线
+     */
+    private Integer serviceProviderStatus;
+    /**
+     * 同意协议标志
+     */
+    private Integer agreeFlag;
+    /**
+     * 注册时间
+     */
+    private String registerTime;
+    /**
+     * 注册ip
+     */
+    private String registerIp;
+    /**
+     * 用户状态,1正常,0冻结
+     */
+    private Integer validFlag;
+    /**
+     * 审核状态,0 待审 1 审核通过 2 审核不通过
+     */
+    private Integer auditStatus;
+
+    /**
+     * 审核时间
+     */
+    private String auditTime;
+
+    /**
+     * 审核备注
+     */
+    private String auditNote;
+
+    /**
+     * 采美豆数量
+     */
+    private Integer userBeans;
+
+    /**
+     * 账户实际可用余额
+     */
+    private Double ableUserMoney;
+
+    /**
+     * 头像
+     */
+    private String image;
+
+    /**
+     * 审核不通过原因列表
+     */
+    private List<String> auditNoteList;
+    /**
+     * 登入时间
+     */
+    private String loginTime;
+}

+ 2 - 1
src/main/java/com/caimei365/commodity/service/CouponService.java

@@ -6,6 +6,7 @@ import com.caimei365.commodity.model.dto.RedeemCouponsDto;
 import com.caimei365.commodity.model.vo.CouponVo;
 import com.github.pagehelper.PageInfo;
 
+import java.text.ParseException;
 import java.util.Map;
 
 /**
@@ -54,7 +55,7 @@ public interface CouponService {
      * @param couponsDto
      * @return
      */
-    ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto);
+    ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto) throws ParseException;
 
     /**
      * 兑换优惠券

+ 77 - 16
src/main/java/com/caimei365/commodity/service/impl/CouponServiceImpl.java

@@ -1,29 +1,36 @@
 package com.caimei365.commodity.service.impl;
 
+import com.alibaba.fastjson.JSONObject;
 import com.caimei365.commodity.components.PriceUtilService;
-import com.caimei365.commodity.mapper.CouponMapper;
-import com.caimei365.commodity.mapper.PageMapper;
-import com.caimei365.commodity.mapper.PriceMapper;
-import com.caimei365.commodity.mapper.ShopMapper;
+import com.caimei365.commodity.feign.ToolsFeign;
+import com.caimei365.commodity.mapper.*;
 import com.caimei365.commodity.model.ResponseJson;
 import com.caimei365.commodity.model.dto.CollarCouponsDto;
 import com.caimei365.commodity.model.dto.RedeemCouponsDto;
 import com.caimei365.commodity.model.po.CouponClubPo;
 import com.caimei365.commodity.model.po.CouponRedemptionCodePo;
-import com.caimei365.commodity.model.vo.ActivityCouponVo;
-import com.caimei365.commodity.model.vo.CouponVo;
-import com.caimei365.commodity.model.vo.ProductItemVo;
-import com.caimei365.commodity.model.vo.ShopVo;
+import com.caimei365.commodity.model.vo.*;
 import com.caimei365.commodity.service.CouponService;
 import com.github.pagehelper.PageHelper;
 import com.github.pagehelper.PageInfo;
+import lombok.SneakyThrows;
 import org.apache.commons.lang.StringUtils;
 import org.springframework.beans.BeanUtils;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.scheduling.annotation.Scheduled;
 import org.springframework.stereotype.Service;
 import org.springframework.transaction.annotation.Transactional;
 
 import javax.annotation.Resource;
+import java.text.ParseException;
+import java.text.SimpleDateFormat;
 import java.util.*;
+import java.util.concurrent.Executors;
+import java.util.concurrent.ScheduledExecutorService;
+import java.util.concurrent.TimeUnit;
+import java.util.concurrent.atomic.AtomicBoolean;
+import java.util.regex.Matcher;
+import java.util.regex.Pattern;
 
 /**
  * Description
@@ -33,6 +40,10 @@ import java.util.*;
  */
 @Service
 public class CouponServiceImpl implements CouponService {
+    @Value("${spring.cloud.config.profile}")
+    private String profile;
+    @Resource
+    private ToolsFeign toolsFeign;
     @Resource
     private CouponMapper couponMapper;
     @Resource
@@ -43,6 +54,8 @@ public class CouponServiceImpl implements CouponService {
     private PriceMapper priceMapper;
     @Resource
     private PriceUtilService priceUtilService;
+    @Resource
+    private MessageCenterMapper messageCenterMapper;
 
     /**
      * 已领取优惠券中心
@@ -131,7 +144,7 @@ public class CouponServiceImpl implements CouponService {
     }
 
     @Override
-    public ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto) {
+    public ResponseJson<String> collarCoupons(CollarCouponsDto couponsDto) throws ParseException {
         Integer id = couponMapper.findCouponClubByUserId(couponsDto.getUserId(), couponsDto.getCouponId());
         if (id != null && id > 0) {
             return ResponseJson.error("已经领取过了", null);
@@ -153,6 +166,13 @@ public class CouponServiceImpl implements CouponService {
         return ResponseJson.success("领取成功");
     }
 
+
+
+
+
+
+
+
     @Transactional(rollbackFor = Exception.class)
     @Override
     public ResponseJson<CouponVo> redeemCoupons(RedeemCouponsDto redeemCouponsDto) {
@@ -222,7 +242,7 @@ public class CouponServiceImpl implements CouponService {
         //未领取
         List<CouponVo> notCouponList = couponMapper.findCouponList(userId, registerTime);
         filterCoupon(source, product, notCouponList);
-        notCouponList.forEach(n->n.setCouponBtnType(0));
+        notCouponList.forEach(n -> n.setCouponBtnType(0));
         //超级会员优惠券移除
         if (notCouponList != null && notCouponList.size() > 0) {
             notCouponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
@@ -230,7 +250,7 @@ public class CouponServiceImpl implements CouponService {
         map.put("notCouponNum", notCouponList == null ? 0 : notCouponList.size());
         //已领取
         List<CouponVo> couponList = couponMapper.findCouponClub(userId, 1);
-        couponList.forEach(c->c.setCouponBtnType(1));
+        couponList.forEach(c -> c.setCouponBtnType(1));
         //超级会员优惠券移除
         if (couponList != null && couponList.size() > 0) {
             couponList.removeIf(couponVo -> vipCoupon.contains(couponVo.getCouponId()));
@@ -258,32 +278,33 @@ public class CouponServiceImpl implements CouponService {
 
     /**
      * 用户可查看的价值优惠券
+     *
      * @param userId
      * @param pageNum
      * @param pageSize
      * @return
      */
     @Override
-    public ResponseJson<PageInfo<CouponVo>> findMoneyCoupons(Integer userId,int pageNum, int pageSize) {
+    public ResponseJson<PageInfo<CouponVo>> findMoneyCoupons(Integer userId, int pageNum, int pageSize) {
         Date registerTime = couponMapper.findUserRegisterTime(userId);
         PageHelper.startPage(pageNum, pageSize);
-        List<CouponVo> cop = couponMapper.findMoneyCoupons(userId,registerTime);
+        List<CouponVo> cop = couponMapper.findMoneyCoupons(userId, registerTime);
         PageInfo<CouponVo> pageInfo = new PageInfo<>(cop);
         return ResponseJson.success(pageInfo);
     }
 
     @Override
     public ResponseJson<CouponVo> findCouponDetail(Integer couponId) {
-        CouponVo couponVo=couponMapper.findCouponDetail(couponId);
+        CouponVo couponVo = couponMapper.findCouponDetail(couponId);
         return ResponseJson.success(couponVo);
     }
 
     @Override
     public ResponseJson<PageInfo<CouponVo>> collarCenterList(Integer userId, int pageNum, int pageSize) {
         Date registerTime = couponMapper.findUserRegisterTime(userId);
-        Integer permission=couponMapper.findUserPermission(userId);
+        Integer permission = couponMapper.findUserPermission(userId);
         //如果是协销,userid置为0查所有
-        if(1==permission){
+        if (1 == permission) {
             userId = 0;
         }
         PageHelper.startPage(pageNum, pageSize);
@@ -325,4 +346,44 @@ public class CouponServiceImpl implements CouponService {
             }
         }
     }
+
+    /**
+     * 请求发短信接口
+     *
+     * @param markId  跳转类型
+     * @param mobile  手机号
+     * @param content 内容
+     */
+    public boolean getSendSms(int markId, String mobile, String content) {
+        AtomicBoolean returnValue = new AtomicBoolean(false);
+        try {
+            //测试环境手机号允许发短信
+            List<String> list = new ArrayList<>();
+            list.add("15917362709");
+            list.add("15814011616");
+            list.add("13100721916");
+            list.add("15113936829");
+            list.add("18175515644");
+            list.add("18476937515");
+            if ("prod".equals(profile) || list.contains(mobile)) {
+                if (StringUtils.isNotBlank(mobile) && mobile.length() == 11) {
+                    String regex = "^(1[3-9]\\d{9}$)";
+                    Pattern pattern = Pattern.compile(regex);
+                    Matcher matcher = pattern.matcher(mobile);
+                    if (matcher.matches()) {
+                        // 调用 ToolsFeign 发送短信
+                        String jsonStr = toolsFeign.getSendSms(mobile, content);
+                        JSONObject parseObject = JSONObject.parseObject(jsonStr);
+                        if (0 == parseObject.getInteger("code")){
+                            returnValue.set(true);
+                        }
+                    }
+                }
+            }
+        } catch (Exception e) {
+
+        }
+        return returnValue.get();
+    }
+
 }

+ 10 - 0
src/main/java/com/caimei365/commodity/service/impl/ShopServiceImpl.java

@@ -122,6 +122,16 @@ public class ShopServiceImpl implements ShopService {
         map.put("productPage", productPage);
         int featuredNum = shopMapper.getMainProductsCount(shopId);
         map.put("featuredNum", featuredNum);
+       Integer listingFeeCount= shopMapper.listingFee(shopId);
+        Integer listingfeeExpireCount= shopMapper.listingfeeExpire(shopId);
+        Integer receStatctCount=shopMapper.receStatct(shopId);
+        Integer listingFee=0;
+        if(listingFeeCount>0 || listingfeeExpireCount>0){
+            if(receStatctCount<=0){
+                listingFee=1;
+            }
+        }
+        map.put("listingFee", listingFee);
         return ResponseJson.success(map);
     }
 

+ 25 - 0
src/main/resources/mapper/MessageCenter.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0" encoding="UTF-8" ?>
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
+<mapper namespace="com.caimei365.commodity.mapper.MessageCenterMapper">
+    <insert id="addMessageCenter">
+        INSERT INTO message_center (shopID, clubID, userType, messageType, content,time,accountType,couponType,couponFee)
+        VALUES (#{shopID}, #{clubID}, #{userType}, #{messageType}, #{content},#{time},#{accountType},#{couponType},#{couponFee})
+    </insert>
+
+    <select id="clubIdCule" resultType="java.lang.Integer">
+        SELECT clubID FROM `user` WHERE userId=#{userId}
+    </select>
+
+    <select id="clubList" resultType="com.caimei365.commodity.model.vo.UserVo">
+        SELECT * FROM `user` WHERE userId=#{userId}
+    </select>
+
+    <select id="CouponList" resultType="com.caimei365.commodity.model.vo.CouponVo">
+        SELECT * FROM cm_coupon WHERE couponType=#{couponType} AND  NOW()>= startDate AND endDate >= NOW() AND status=1 AND delFlag=0
+    </select>
+
+    <select id="contractMobile" resultType="java.lang.String">
+        SELECT contractMobile FROM club WHERE userID=#{UserID}
+    </select>
+
+</mapper>

+ 1 - 0
src/main/resources/mapper/PageMapper.xml

@@ -827,6 +827,7 @@
                 </foreach>
             </if>
         </where>
+        order by p.sortIndex desc
     </select>
 
     <select id="getNewFloor" resultType="com.caimei365.commodity.model.vo.ProductItemVo">

+ 15 - 2
src/main/resources/mapper/ShopMapper.xml

@@ -85,7 +85,7 @@
             qualificationTime,
         </if>
 
-        updateTime,validFlag,newProductType,showFlag
+        updateTime,validFlag,newProductType,showFlag,newvalidFlag
         ) values (
         #{shopId}, #{name}, #{aliasName}, #{commodityType}, #{bigTypeId}, #{smallTypeId}, #{tinyTypeId}, #{mainImage},
         #{brandId}, #{productType}, #{tags}, #{unit}, #{normalPrice}, #{price}, #{includedTax}, #{minBuyNumber},
@@ -168,7 +168,7 @@
         <if test="qualificationTime != null and  qualificationTime != ''">
             #{qualificationTime},
         </if>
-        #{updateTime}, #{validFlag},#{newProductType},#{showFlag}
+        #{updateTime}, #{validFlag},#{newProductType},#{showFlag},3
         )
     </insert>
     <update id="updateProduct">
@@ -704,4 +704,17 @@
         from shop
         where shopID = #{shopId}
     </select>
+
+    <select id="listingFee" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM `cm_discern_receipt` WHERE newReceiptType=1 AND shopID=#{shopID}
+    </select>
+
+    <select id="listingfeeExpire" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM `cm_discern_receipt` WHERE newReceiptType=1 AND shopID=#{shopID} AND NOW()> DATE_ADD(receiptDate, INTERVAL 1 YEAR)
+    </select>
+
+    <select id="receStatct" resultType="java.lang.Integer">
+        SELECT COUNT(*) FROM `cm_discern_receipt` WHERE newReceiptType=1 AND shopID=#{shopID} AND receStatct=2
+    </select>
+
 </mapper>