| @@ -22,7 +22,7 @@ public interface WxCUserBasicInfoMapper extends CommonMapper<WxCUserBasicInfo, S | |||||
| List<WxCUserBasicInfo> findList(WxCUserBasicInfo wxCUserBasicInfo); | List<WxCUserBasicInfo> findList(WxCUserBasicInfo wxCUserBasicInfo); | ||||
| List<WxCUserBasicInfo> findList1(@Param("tenantInfo")TenantEntity tenantInfo, @Param("basicInfo")WxCUserBasicInfo wxCUserBasicInfo); | List<WxCUserBasicInfo> findList1(@Param("tenantInfo")TenantEntity tenantInfo, @Param("basicInfo")WxCUserBasicInfo wxCUserBasicInfo); | ||||
| List<WxCUserBasicInfo> findListPhoneAndName(WxCUserBasicInfo wxCUserBasicInfo); | |||||
| List<WxCUserBasicInfo> findListPhoneAndNameByIds(WxCUserBasicInfo wxCUserBasicInfo); | |||||
| WxCUserBasicInfo selectById(@Param("id")Long id,@Param("finalTenantId")String finalTenantId); | WxCUserBasicInfo selectById(@Param("id")Long id,@Param("finalTenantId")String finalTenantId); | ||||
| @@ -16,7 +16,7 @@ public interface WxCouponMapper extends CommonMapper<WxCoupon, Long> { | |||||
| List<WxCoupon> findList(WxCoupon wxCoupon); | List<WxCoupon> findList(WxCoupon wxCoupon); | ||||
| List<WxCoupon> findSimpleList(WxCoupon wxCoupon); | |||||
| List<WxCoupon> findTenantSimpleList(WxCoupon wxCoupon); | |||||
| List<Long> findIdList(WxCoupon wxCoupon); | List<Long> findIdList(WxCoupon wxCoupon); | ||||
| List<WxCoupon> findCouponList(WxCoupon wxCoupon); | List<WxCoupon> findCouponList(WxCoupon wxCoupon); | ||||
| @@ -11,7 +11,7 @@ public interface WxMerchantBUserMapper extends CommonMapper<WxMerchantBUser, Lon | |||||
| List<Long> findIdList(WxMerchantBUser wxMerchantBUser); | List<Long> findIdList(WxMerchantBUser wxMerchantBUser); | ||||
| List<WxMerchantBUser> findMerchantIdList(WxMerchantBUser wxMerchantBUser); | |||||
| List<WxMerchantBUser> findMerchantIdListByIds(WxMerchantBUser wxMerchantBUser); | |||||
| List<WxMerchantBuInfoVo> findSelMerchantList(WxMerchantBUser wxMerchantBUser); | List<WxMerchantBuInfoVo> findSelMerchantList(WxMerchantBUser wxMerchantBUser); | ||||
| @@ -45,7 +45,7 @@ public interface WxCUserBasicInfoService { | |||||
| PageInfo<WxCUserBasicInfo> listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize); | PageInfo<WxCUserBasicInfo> listAsPage(WxCUserBasicInfo record, Integer pageIndex, Integer pageSize); | ||||
| PageInfo<WxCUserBasicInfo> listAsPage(TenantEntity tenantInfo, WxCUserBasicInfo wxCUserBasicInfo, Integer pageIndex, Integer pageSize); | PageInfo<WxCUserBasicInfo> listAsPage(TenantEntity tenantInfo, WxCUserBasicInfo wxCUserBasicInfo, Integer pageIndex, Integer pageSize); | ||||
| List<WxCUserBasicInfo> listPhoneAndName(WxCUserBasicInfo record); | |||||
| List<WxCUserBasicInfo> listPhoneAndNameByIds(WxCUserBasicInfo record); | |||||
| /** | /** | ||||
| * 根据实体查询列表 | * 根据实体查询列表 | ||||
| @@ -587,8 +587,8 @@ public class WxCUserBasicInfoServiceImpl implements WxCUserBasicInfoService,IExc | |||||
| } | } | ||||
| @Override | @Override | ||||
| public List<WxCUserBasicInfo> listPhoneAndName(WxCUserBasicInfo record) { | |||||
| return wxCUserBasicInfoMapper.findListPhoneAndName(record); | |||||
| public List<WxCUserBasicInfo> listPhoneAndNameByIds(WxCUserBasicInfo record) { | |||||
| return wxCUserBasicInfoMapper.findListPhoneAndNameByIds(record); | |||||
| } | } | ||||
| @Override | @Override | ||||
| @@ -534,7 +534,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| logger.info(">>>>>>>>>>>>>>>>>>>>>> query merchant :"+(times2-times1)); | logger.info(">>>>>>>>>>>>>>>>>>>>>> query merchant :"+(times2-times1)); | ||||
| WxCoupon couponQ = new WxCoupon(); | WxCoupon couponQ = new WxCoupon(); | ||||
| couponQ.updateTenantInfo(tenantEntity); | couponQ.updateTenantInfo(tenantEntity); | ||||
| List<WxCoupon> couponList = wxCouponMapper.findSimpleList(couponQ); | |||||
| List<WxCoupon> couponList = wxCouponMapper.findTenantSimpleList(couponQ); | |||||
| Map<Long,WxCoupon> couponMap = new HashMap<Long,WxCoupon>(); | Map<Long,WxCoupon> couponMap = new HashMap<Long,WxCoupon>(); | ||||
| if (null != couponList) { | if (null != couponList) { | ||||
| for (int i = 0 ; i < couponList.size() ; i ++) { | for (int i = 0 ; i < couponList.size() ; i ++) { | ||||
| @@ -582,7 +582,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| WxCUserBasicInfo cUserBasicInfoQ = new WxCUserBasicInfo(); | WxCUserBasicInfo cUserBasicInfoQ = new WxCUserBasicInfo(); | ||||
| cUserBasicInfoQ.setIds(cUserIdList); | cUserBasicInfoQ.setIds(cUserIdList); | ||||
| cUserBasicInfoQ.setFinalTenantId(tenantEntity.getFinalTenantId());; | cUserBasicInfoQ.setFinalTenantId(tenantEntity.getFinalTenantId());; | ||||
| List<WxCUserBasicInfo> cuserList = wxCUserBasicInfoService.listPhoneAndName(cUserBasicInfoQ); | |||||
| List<WxCUserBasicInfo> cuserList = wxCUserBasicInfoService.listPhoneAndNameByIds(cUserBasicInfoQ); | |||||
| if (null != cuserList) { | if (null != cuserList) { | ||||
| for (int i = 0 ; i < cuserList.size() ; i++) { | for (int i = 0 ; i < cuserList.size() ; i++) { | ||||
| WxCUserBasicInfo cbi = cuserList.get(i); | WxCUserBasicInfo cbi = cuserList.get(i); | ||||
| @@ -596,7 +596,7 @@ public class WxCouponOrderServiceImpl implements WxCouponOrderService { | |||||
| WxMerchantBUser merchantBUserQ = new WxMerchantBUser(); | WxMerchantBUser merchantBUserQ = new WxMerchantBUser(); | ||||
| merchantBUserQ.setIds(bUserIdList); | merchantBUserQ.setIds(bUserIdList); | ||||
| merchantBUserQ.updateTenantInfo(tenantEntity); | merchantBUserQ.updateTenantInfo(tenantEntity); | ||||
| List<WxMerchantBUser> busrlist = wxMerchantBUserMapper.findMerchantIdList(merchantBUserQ); | |||||
| List<WxMerchantBUser> busrlist = wxMerchantBUserMapper.findMerchantIdListByIds(merchantBUserQ); | |||||
| Map<Long,Long> buserMerchantIdMap = new HashMap<Long,Long>(); | Map<Long,Long> buserMerchantIdMap = new HashMap<Long,Long>(); | ||||
| if (null != busrlist ) { | if (null != busrlist ) { | ||||
| for (int i = 0 ; i < busrlist.size() ; i ++) { | for (int i = 0 ; i < busrlist.size() ; i ++) { | ||||
| @@ -156,10 +156,16 @@ | |||||
| </if> | </if> | ||||
| </select> | </select> | ||||
| <select id="findListPhoneAndName" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | |||||
| <select id="findListPhoneAndNameByIds" parameterType="com.iformall.domain.po.WxCUserBasicInfo" resultMap="BaseResultMap"> | |||||
| select id, phone, nick_name | select id, phone, nick_name | ||||
| from wx_c_user_basic_info wcubi | from wx_c_user_basic_info wcubi | ||||
| <include refid="dynamicWhereConditions"/> | |||||
| where wcubi.`final_tenant_id` = #{finalTenantId} | |||||
| <if test=" null != ids "> | |||||
| and wcubi.id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| </select> | </select> | ||||
| <sql id="dynamicWhereConditions1"> | <sql id="dynamicWhereConditions1"> | ||||
| @@ -324,10 +324,9 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findSimpleList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | |||||
| <select id="findTenantSimpleList" parameterType="com.iformall.domain.po.WxCoupon" resultMap="BaseResultMap"> | |||||
| select id,title,sale_price,use_price,price,auto_refund,business,subsidy_type,source_type | select id,title,sale_price,use_price,price,auto_refund,business,subsidy_type,source_type | ||||
| from wx_coupon c | |||||
| <include refid="dynamicWhereConditions"/> | |||||
| from wx_coupon c.`tenant_id` = #{tenantId} | |||||
| </select> | </select> | ||||
| <select id="findIdList" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | <select id="findIdList" parameterType="com.iformall.domain.po.WxCoupon" resultType="Long"> | ||||
| @@ -144,7 +144,7 @@ | |||||
| <select id = "findMerchantProduct" parameterType="java.util.Map" resultMap="MerchantProductVoResultMap"> | <select id = "findMerchantProduct" parameterType="java.util.Map" resultMap="MerchantProductVoResultMap"> | ||||
| SELECT wcm.product_id,wcm.merchant_id,COUNT(1) AS mc | SELECT wcm.product_id,wcm.merchant_id,COUNT(1) AS mc | ||||
| FROM wx_coupon_merchant wcm | FROM wx_coupon_merchant wcm | ||||
| WHERE STATUS = 0 | |||||
| WHERE wcm.STATUS = 0 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcm.`tenant_id` = #{tenantId} | and wcm.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -160,7 +160,7 @@ | |||||
| <select id = "findMerchantProductIds" parameterType="java.util.Map" resultType="Long"> | <select id = "findMerchantProductIds" parameterType="java.util.Map" resultType="Long"> | ||||
| SELECT distinct wcm.product_id | SELECT distinct wcm.product_id | ||||
| FROM wx_coupon_merchant wcm | FROM wx_coupon_merchant wcm | ||||
| WHERE STATUS = 0 | |||||
| WHERE wcm.STATUS = 0 | |||||
| <if test=" null != tenantId and '' != tenantId"> | <if test=" null != tenantId and '' != tenantId"> | ||||
| and wcm.`tenant_id` = #{tenantId} | and wcm.`tenant_id` = #{tenantId} | ||||
| </if> | </if> | ||||
| @@ -101,10 +101,16 @@ | |||||
| <include refid="dynamicWhereConditions"/> | <include refid="dynamicWhereConditions"/> | ||||
| </select> | </select> | ||||
| <select id="findMerchantIdList" parameterType="com.iformall.domain.po.WxMerchantBUser" resultMap="BaseResultMap"> | |||||
| <select id="findMerchantIdListByIds" parameterType="com.iformall.domain.po.WxMerchantBUser" resultMap="BaseResultMap"> | |||||
| select id, merchant_id | select id, merchant_id | ||||
| from wx_merchant_b_user | from wx_merchant_b_user | ||||
| <include refid="dynamicWhereConditions"/> | |||||
| where `tenant_id` = #{tenantId} | |||||
| <if test=" null != ids "> | |||||
| and id in | |||||
| <foreach collection="ids" index="index" item="idItem" open="(" separator="," close=")"> | |||||
| #{idItem} | |||||
| </foreach> | |||||
| </if> | |||||
| </select> | </select> | ||||
| <select id="findSelMerchantList" parameterType="com.iformall.domain.po.WxMerchantBUser" resultType="com.iformall.domain.vo.WxMerchantBuInfoVo"> | <select id="findSelMerchantList" parameterType="com.iformall.domain.po.WxMerchantBUser" resultType="com.iformall.domain.vo.WxMerchantBuInfoVo"> | ||||