Quellcode durchsuchen

Merge branch 'release_toaliyun_real' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real

release_toaliyun_real
winter vor 3 Jahren
Ursprung
Commit
881f196433
13 geänderte Dateien mit 79 neuen und 41 gelöschten Zeilen
  1. +2
    -2
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProfitSharingReceiverApplyController.java
  2. +0
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/market/TtCouponGoodsController.java
  3. +2
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java
  4. +2
    -0
      mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java
  5. +2
    -2
      mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantReceiverApplyVo.java
  6. +1
    -1
      mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java
  7. +2
    -0
      mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java
  8. +39
    -10
      mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java
  9. +20
    -6
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java
  10. +0
    -17
      mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java
  11. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java
  12. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java
  13. +7
    -0
      mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml

+ 2
- 2
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxProfitSharingReceiverApplyController.java Datei anzeigen

@@ -144,14 +144,14 @@ public class WxProfitSharingReceiverApplyController extends BaseController {
@SystemControllerLog(description = "修改")
public ResultData delReceiverApply(@RequestBody WxProfitSharingReceiverApply receiverApply) {
log.debug("[" + getIpAddr() + "] merchantProfitSharingReceiver::delReceiverApply");
if(receiverApply.getId() == null || receiverApply.getFunctionState() == null){
if(receiverApply.getId() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
WxProfitSharingReceiverApply delApply = wxProfitSharingReceiverApplyService.selectById(receiverApply.getId());
if(receiverApply == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "未找到进件数据");
}
if(!EnumSharingReceiverApplymentState.APPLYMENT_STATE_CANCELED.getCode().equals(receiverApply.getApplymentState())){
if(EnumSharingReceiverApplymentState.APPLYMENT_STATE_CANCELED.getCode().equals(receiverApply.getApplymentState())){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(), "已作废,才能删除");
}
return wxProfitSharingReceiverApplyService.updateDel(delApply);


+ 0
- 1
mallinkAdmin/src/main/java/com/iformall/controller/market/TtCouponGoodsController.java Datei anzeigen

@@ -170,7 +170,6 @@ public class TtCouponGoodsController extends BaseController {
if (id == null) {
return new ResultData(ResultData.ERROR, "缺少id");
}
return ttCouponGoodsService.productOperate(getTenantInfo(),id);
}



+ 2
- 0
mallinkAdmin/src/main/java/com/iformall/controller/market/WxCouponChannelController.java Datei anzeigen

@@ -96,6 +96,8 @@ public class WxCouponChannelController extends BaseController {
//生成二维码
if(couponChannel!=null){
wxCouponChannelService.updateQrCode(couponChannel,couponChannel.getId(),couponChannel.getType());

wxCouponChannelService.spuStatusSyncByCoupon(couponChannel,couponChannel.getCouponId());
}
CouponCacheUtils.removeCouponChannelCache(redisTemplate, wxCouponChannel.getId());
CouponCacheUtils.removeDouyinLivePageCache(redisTemplate, wxCouponChannel.getTenantId(), null, null);


+ 2
- 0
mallinkBApi/src/main/java/com/iformall/controller/WxCouponChannelController.java Datei anzeigen

@@ -83,6 +83,8 @@ public class WxCouponChannelController extends BaseController {
//生成二维码
if(couponChannel!=null){
wxCouponChannelService.updateQrCode(couponChannel,couponChannel.getId(),couponChannel.getType());

wxCouponChannelService.spuStatusSyncByCoupon(couponChannel,couponChannel.getCouponId());
}
CouponCacheUtils.removeCouponChannelCache(redisTemplate, wxCouponChannel.getId());
return resultData;


+ 2
- 2
mallinkService/src/main/java/com/iformall/domain/vo/WxMerchantReceiverApplyVo.java Datei anzeigen

@@ -53,14 +53,14 @@ public class WxMerchantReceiverApplyVo extends TenantEntity {
@io.swagger.annotations.ApiModelProperty(value="微信支付申请单号",name="applymentId")
private String applymentId;
@Excel(name="进件状态",width = 20,orderNum = "8",replace = {"编辑中_1", "提交审核成功_11", "资料效验中_2", "审核中_3", "已驳回_4",
"待账户验证_5", "待签约_6", "功能开通中_7", "完成_8", "已冻结_9", "已作废_10"})
"待账户验证_5", "待签约_6", "功能开通中_7", "完成_8", "已冻结_9", "已作废_10"})
@io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplymentState 申请状态",name="applymentState")
private Integer applymentState;
@Excel(name="进件状态描述",width = 20,orderNum = "9")
@io.swagger.annotations.ApiModelProperty(value="申请状态描述",name="applymentStateDesc")
private String applymentStateDesc;

@Excel(name="功能开通状态",width = 20,orderNum = "10",replace = {"开通中_1", "未开通_0", "开通_2"})
@Excel(name="功能开通状态",width = 20,orderNum = "10",replace = {"开通中_1", "未开通_0", "开通完成_2"})
@io.swagger.annotations.ApiModelProperty(value="EnumSharingReceiverApplyFunctionStatus 功能开通状态",name="functionState")
private Integer functionState;
@io.swagger.annotations.ApiModelProperty(value="功能开通状态描述",name="functionStateDesc")


+ 1
- 1
mallinkService/src/main/java/com/iformall/enums/EnumSharingReceiverApplymentState.java Datei anzeigen

@@ -26,7 +26,7 @@ public enum EnumSharingReceiverApplymentState {
APPLYMENT_STATE_TO_BE_CONFIRMED(5, ApplymentStateEnum.APPLYMENT_STATE_TO_BE_CONFIRMED,"待账户验证"),
APPLYMENT_STATE_TO_BE_SIGNED(6, ApplymentStateEnum.APPLYMENT_STATE_TO_BE_SIGNED,"待签约"),
APPLYMENT_STATE_SIGNING(7, ApplymentStateEnum.APPLYMENT_STATE_SIGNING,"开通权限中"),
APPLYMENT_STATE_FINISHED(8, ApplymentStateEnum.APPLYMENT_STATE_FINISHED,"完成"),
APPLYMENT_STATE_FINISHED(8, ApplymentStateEnum.APPLYMENT_STATE_FINISHED,"完成"),
// APPLYMENT_STATE_FROZEN(9, "FROZEN", "已冻结"),
APPLYMENT_STATE_CANCELED(10, ApplymentStateEnum.APPLYMENT_STATE_CANCELED,"已作废"),
;


+ 2
- 0
mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverApplyMapper.java Datei anzeigen

@@ -22,4 +22,6 @@ public interface WxProfitSharingReceiverApplyMapper extends CommonMapper<WxProfi
List<WxMerchantReceiverApplyVo> findListVo(WxMerchantReceiverApplyVo receiver);

int updateDelById(@Param("id") Long id);

WxProfitSharingReceiverApply findOne(WxProfitSharingReceiverApply receiverApply);
}

+ 39
- 10
mallinkService/src/main/java/com/iformall/service/impl/WxBusinessServiceImpl.java Datei anzeigen

@@ -5,16 +5,14 @@ import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.iformall.common.IdWorker;
import com.iformall.common.ResultData;
import com.iformall.domain.po.*;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.po.WxBusiness;
import com.iformall.domain.po.WxPropertyContract;
import com.iformall.domain.po.WxRentContract;
import com.iformall.domain.po.WxScoreRules;
import com.iformall.enums.*;
import com.iformall.mapper.WxBusinessMapper;
import com.iformall.mapper.WxPropertyContractMapper;
import com.iformall.mapper.WxRentContractMapper;
import com.iformall.service.WxBusinessService;
import com.iformall.service.WxMallService;
import com.iformall.utils.Constant;
import com.iformall.utils.DateUtils;
import org.apache.commons.collections.CollectionUtils;
@@ -45,6 +43,9 @@ public class WxBusinessServiceImpl implements WxBusinessService {
private WxRentContractMapper wxRentContractMapper;
@Autowired
private WxPropertyContractMapper wxPropertyContractMapper;

@Autowired
private WxMallService wxMallService;
@Autowired
@Qualifier("scoreRuleRedisTemplate")
@@ -326,23 +327,51 @@ public class WxBusinessServiceImpl implements WxBusinessService {
}
//删除积分规则,成长值规则缓存
String key = Constant.SCORE_RULES_KEY_PREV + record.getFinalTenantId();
delRulesRedis(record.getFinalTenantId());
}

private void delRulesRedis(String finalTenantId){
//删除积分规则,成长值规则缓存
String key = Constant.SCORE_RULES_KEY_PREV + finalTenantId;
boolean hasKey = scoreRulesRedisTemplate.hasKey(key);
if (hasKey) {
scoreRulesRedisTemplate.delete(key);
}
String key1 = Constant.CREDIT_RULES_KEY_PREV + record.getFinalTenantId();
String key1 = Constant.CREDIT_RULES_KEY_PREV + finalTenantId;
boolean hasKey1 = scoreRulesRedisTemplate.hasKey(key1);
if (hasKey1) {
scoreRulesRedisTemplate.delete(key1);
}
String key2 = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + record.getFinalTenantId();
String key2 = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + finalTenantId;
boolean hasKey2 = scoreRulesRedisTemplate.hasKey(key2);
if (hasKey2) {
scoreRulesRedisTemplate.delete(key2);
}
}

TenantEntity tenantEntity = new TenantEntity();
tenantEntity.setTenantId(finalTenantId);
List<TenantEntity> tenantEntitys = wxMallService.getTenantEntitys(tenantEntity);
if(tenantEntitys != null && tenantEntitys.size() > 0){
for (TenantEntity entity:tenantEntitys) {
String scorekey = Constant.SCORE_RULES_KEY_PREV + entity.getTenantId();
if (scoreRulesRedisTemplate.hasKey(scorekey)) {
scoreRulesRedisTemplate.delete(scorekey);
}

String creditkey = Constant.CREDIT_RULES_KEY_PREV + entity.getTenantId();
if (scoreRulesRedisTemplate.hasKey(creditkey)) {
scoreRulesRedisTemplate.delete(creditkey);
}

String creditDoublekey = Constant.CREDIT_DOUBLE_RULES_KEY_PREV + entity.getTenantId();
if (scoreRulesRedisTemplate.hasKey(creditDoublekey)) {
scoreRulesRedisTemplate.delete(creditDoublekey);
}
}
}

}

}

+ 20
- 6
mallinkService/src/main/java/com/iformall/service/impl/WxCouponChannelServiceImpl.java Datei anzeigen

@@ -144,6 +144,7 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
}else{
WxCouponChannel old = getById(record.getId(),record.getTenantId());
wxCoupon = wxCouponService.getById(old.getCouponId(),old.getTenantId());

if(EnumCouponChannelStatus.STATUS_TAKE_OFFF.getCode().equals(old.getStatus())
&& EnumCouponChannelStatus.STATUS_THROW_IN.getCode().equals(record.getStatus())){
if(record.getTargetAd() == null){
@@ -168,6 +169,9 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"该券未提交审核或审核未通过");
}
}
if(record.getCouponId() == null){
record.setCouponId(wxCoupon.getId());
}

if(isThrowIn){
//查找是否该券 在该频道有其他上架
@@ -228,7 +232,10 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
updCC.setUpdateDate(new Date());
wxCouponChannelMapper.updateStatusByTargetAd(updCC);

spuStatusSyncByCoupon(wxCoupon,wxCoupon.getId());
/**
* 事务原因可能导致状态不一致, 放到事务完成之后
*/
// spuStatusSyncByCoupon(wxCoupon,wxCoupon.getId());
}

/**
@@ -255,7 +262,11 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
updCC.setUpdateDate(new Date());
wxCouponChannelMapper.updateStatusByTargetAd(updCC);

spuStatusSyncByCoupon(wxCoupon,wxCoupon.getId());
/**
*
* 事务原因可能导致状态不一致, 放到事务完成之后
*/
// spuStatusSyncByCoupon(wxCoupon,wxCoupon.getId());
}
}

@@ -709,12 +720,15 @@ public class WxCouponChannelServiceImpl implements WxCouponChannelService {
wxCouponChannel.setChannelStock(channelStock);
ResultData resultData = saveOrUpdate(wxCouponChannel);
WxCouponChannel channel = (WxCouponChannel)resultData.data;
vo.setId(channel.getId());
vo.setType(channel.getType());
vo.setSuc(true);
if(channel != null){
vo.setId(channel.getId());
vo.setType(channel.getType());
vo.setSuc(true);

this.updateQrCode(channel,channel.getId(),channel.getType());
this.updateQrCode(channel,channel.getId(),channel.getType());

this.spuStatusSyncByCoupon(channel,channel.getCouponId());
}
return vo;
}



+ 0
- 17
mallinkService/src/main/java/com/iformall/service/impl/WxCouponServiceImpl.java Datei anzeigen

@@ -1439,13 +1439,6 @@ public class WxCouponServiceImpl implements WxCouponService {
}

private void spuStockSync(TenantEntity tenantEntity,Long couponId){
// new Thread(() -> {
// //1秒之后同步poi
// try {
// Thread.currentThread().sleep(1000);
// } catch (Exception e) {
// logger.error("sleep error: " + e.getMessage());
// }

FmInsideProductPushMsg productPush = new FmInsideProductPushMsg();
productPush.setDelayTimeLevel(3);
@@ -1456,18 +1449,10 @@ public class WxCouponServiceImpl implements WxCouponService {
logger.info(">>>>>>>>>>>send FmInsideProductPushMsg :"+productPush);
mqBaseProducer.sendMessage(productPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());

// }).start();

}

private void spuFreeAuditSync(TenantEntity tenantEntity,Long couponId){
// new Thread(() -> {
// //1秒之后同步poi
// try {
// Thread.currentThread().sleep(1000);
// } catch (Exception e) {
// logger.error("sleep error: " + e.getMessage());
// }

FmInsideProductPushMsg productPush = new FmInsideProductPushMsg();
productPush.setDelayTimeLevel(3);
@@ -1478,8 +1463,6 @@ public class WxCouponServiceImpl implements WxCouponService {
logger.info(">>>>>>>>>>>send FmInsideProductPushMsg :"+productPush);
mqBaseProducer.sendMessage(productPush, EnumMsgMqTopic.DEFAULT.getCode(), EnumMsgMqTag.DEFAULT.getCode(), EnumMsgMqKey.DEFAULT.getCode());

// }).start();

}

@Override


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxMallServiceImpl.java Datei anzeigen

@@ -265,7 +265,7 @@ public class WxMallServiceImpl implements WxMallService {
return wxMallMapper.getTenantEntitys(tenantEntity);
}else{
List<TenantEntity> list = new ArrayList<>();
list.add(tenantEntity);
list.add(mall);
return list;
}
}


+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/WxProfitSharingReceiverApplyServiceImpl.java Datei anzeigen

@@ -77,7 +77,7 @@ public class WxProfitSharingReceiverApplyServiceImpl implements WxProfitSharingR
receiverApply.setMerchantId(merchantId);
receiverApply.setPlat(plat.getCode());
// receiverApply.setStatus(EnumSharingReceiverApplyStatus.PROFIT_RECEIVER_APPLY_STATUS_VALID.getCode());
return wxProfitSharingReceiverApplyMapper.selectOne(new QueryWrapper<>(receiverApply));
return wxProfitSharingReceiverApplyMapper.findOne(receiverApply);
}

@Override


+ 7
- 0
mallinkService/src/main/resources/mapper/WxProfitSharingReceiverApplyMapper.xml Datei anzeigen

@@ -142,6 +142,13 @@
<include refid="dynamicWhereConditions"/>
</select>

<select id="findOne" parameterType="com.iformall.domain.po.WxProfitSharingReceiverApply" resultMap="BaseResultMap">
select
<include refid="allColumns"/>
from wx_profit_sharing_receiver_apply
<include refid="dynamicWhereConditions"/>
</select>

<select id="findResultStateById" parameterType="Long" resultMap="BaseResultMap">
select
`id`,`tenant_id`,`parent_tenant_id`,`merchant_id`,`plat`,`out_request_no`,


Laden…
Abbrechen
Speichern