Kaynağa Gözat

//tt share

release_toaliyun_real
xhxu 3 yıl önce
ebeveyn
işleme
e202349e95
7 değiştirilmiş dosya ile 127 ekleme ve 50 silme
  1. +1
    -1
      mallinkAdmin/src/main/java/com/iformall/controller/basic/TtPoiPlanController.java
  2. +47
    -8
      mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java
  3. +2
    -3
      mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverMapper.java
  4. +1
    -1
      mallinkService/src/main/java/com/iformall/service/WxMerchantService.java
  5. +61
    -27
      mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java
  6. +7
    -2
      mallinkService/src/main/resources/mapper/WxProfitSharingReceiverMapper.xml
  7. +8
    -8
      mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java

+ 1
- 1
mallinkAdmin/src/main/java/com/iformall/controller/basic/TtPoiPlanController.java Dosyayı Görüntüle

@@ -107,7 +107,7 @@ public class TtPoiPlanController extends BaseController {
}

@ApiOperation("分页列表接口")
@GetMapping("takeRate")
@GetMapping("takeRateList")
@ApiImplicitParams({
@ApiImplicitParam(name = "pageNum", value = "页数", dataType = "int", paramType = "query", required = true),
@ApiImplicitParam(name = "pageSize", value = "每页条数", dataType = "int", paramType = "query", required = true)})


+ 47
- 8
mallinkAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java Dosyayı Görüntüle

@@ -16,9 +16,11 @@ import com.iformall.domain.po.WxProfitSharingReceiver;
import com.iformall.domain.vo.WxMerchantTradeDetailVo;
import com.iformall.domain.vo.WxMerchantTradeVo;
import com.iformall.domain.vo.WxMerchantVo;
import com.iformall.douyin.pay.enums.AppAddSubMerchantUrlType;
import com.iformall.enums.EnumAppPlat;
import com.iformall.enums.EnumMerchantStatus;
import com.iformall.enums.EnumPayWay;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.service.*;
import com.iformall.utils.Constant;
import io.swagger.annotations.ApiImplicitParam;
@@ -273,14 +275,14 @@ public class WxMerchantController extends BaseController {
return wxMerchantService.top(wxMerchant);
}

@ApiOperation("更新收款账户状态")
@PostMapping("useAccount")
@SystemControllerLog(description = "商户-更新收款账户状态")
public ResultData useAccount(@RequestBody WxProfitSharingReceiver wxProfitSharingReceiver) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::useAccount");
wxProfitSharingReceiver.updateTenantInfo(getTenantInfo());
return wxMerchantService.useAccount(wxProfitSharingReceiver);
}
// @ApiOperation("更新收款账户状态")
// @PostMapping("useAccount")
// @SystemControllerLog(description = "商户-更新收款账户状态")
// public ResultData useAccount(@RequestBody WxProfitSharingReceiver wxProfitSharingReceiver) {
// logger.debug("[" + getIpAddr() + "] WxMerchantController::useAccount");
// wxProfitSharingReceiver.updateTenantInfo(getTenantInfo());
// return wxMerchantService.useAccount(wxProfitSharingReceiver);
// }

@ApiOperation("查看是否存在商户名称相同记录")
@GetMapping("/hasMerchant")
@@ -362,6 +364,43 @@ public class WxMerchantController extends BaseController {
return wxProfitSharingReceiverService.updateTtReceiver(merchant,appInfo.getAppId(),payAcount.getApiKey());
}


@ApiOperation("获取进件/余额页面")
@GetMapping("/getTtReceiverUrl")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
public ResultData getTtReceiver(Long id,Integer urlType) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::getTtReceiver");
if(urlType == null || id == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL.getCode(),"请检查传递参数");
}

WxMerchant merchant = wxMerchantService.selectById(id);
if(merchant == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"请检查传递参数");
}
AppAddSubMerchantUrlType anEnum = AppAddSubMerchantUrlType.getEnum(urlType);
if(anEnum == null){
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"请检查传递参数");
}

WxAppinfo appInfo = wxAppinfoService.getCAppInfo(getTenantInfo(), EnumAppPlat.TOUTIAO);
if(appInfo == null) {
return new ResultData(ErrorCode.APP_ID_NOT_FOUND);
}
WxPayAccount payAcount = payAccountService.getById(appInfo.getPayId());
if(payAcount == null){
return new ResultData(ErrorCode.APP_ID_NOT_FOUND);
}
if(anEnum.equals(AppAddSubMerchantUrlType.improt_URL)){
return wxProfitSharingReceiverService.getTtReceiverImprotURL(merchant,appInfo.getAppId(),payAcount.getApiKey());
}else if(anEnum.equals(AppAddSubMerchantUrlType.Balance_URL)){
return wxProfitSharingReceiverService.getTtReceiverBalanceURL(merchant,appInfo.getAppId(),payAcount.getApiKey());
}else{
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR.getCode(),"请检查传递参数");
}

}

@ApiOperation("修改可用状态")
@GetMapping("/updateTtReceiverIsUse")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)


+ 2
- 3
mallinkService/src/main/java/com/iformall/mapper/WxProfitSharingReceiverMapper.java Dosyayı Görüntüle

@@ -10,7 +10,6 @@ public interface WxProfitSharingReceiverMapper extends CommonMapper<WxProfitShar
WxProfitSharingReceiver findOne(WxProfitSharingReceiver wxProfitSharingReceiver);


List<Long> findMerchantIdList(WxProfitSharingReceiver wxProfitSharingReceiver);
}

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/WxMerchantService.java Dosyayı Görüntüle

@@ -147,7 +147,7 @@ public interface WxMerchantService {

ResultData top(WxMerchant wxMerchant);

ResultData useAccount(WxProfitSharingReceiver wxProfitSharingReceiver);
// ResultData useAccount(WxProfitSharingReceiver wxProfitSharingReceiver);

boolean hasMerchant(WxMerchant wxMerchant);
boolean hasMerchantEncode(WxMerchant wxMerchant);


+ 61
- 27
mallinkService/src/main/java/com/iformall/service/impl/WxMerchantServiceImpl.java Dosyayı Görüntüle

@@ -919,31 +919,31 @@ public class WxMerchantServiceImpl implements WxMerchantService {
return new ResultData(Result.SUCCESS, "操作成功");
}

@Override
public ResultData useAccount(WxProfitSharingReceiver wxProfitSharingReceiver) {
WxProfitSharingReceiver profitSharingReceiver = wxProfitSharingReceiverMapper.selectById(wxProfitSharingReceiver.getId());
profitSharingReceiver.setIsUse(wxProfitSharingReceiver.getIsUse());
profitSharingReceiver.setUpdateTime(new Date());
wxProfitSharingReceiverMapper.updateById(profitSharingReceiver);
Long merchantId = profitSharingReceiver.getMerchantId();
String accout = profitSharingReceiver.getReceiverAccount();
WxMerchant wxMerchant = wxMerchantMapper.selectById(merchantId);
String linkPhone = wxMerchant.getLinkPhone();
String merchantName = wxMerchant.getName();
String tenantId = wxProfitSharingReceiver.getTenantId();
if (StringUtils.isEmpty(linkPhone)) {
return new ResultData(Result.SUCCESS, "操作成功");
}
//发信息
Integer isUse = wxProfitSharingReceiver.getIsUse();
Integer type = EnumMsgModel.ACCEPT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode();
if (isUse.equals(EnumProfitSharingUse.NO.getCode())) {
type = EnumMsgModel.REJECT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode();
}
wxProfitSharingReceiverService.sendMsg(linkPhone, accout, merchantName, null, type, wxMerchant);
return new ResultData(Result.SUCCESS, "操作成功");
}
// @Override
// public ResultData useAccount(WxProfitSharingReceiver wxProfitSharingReceiver) {
// WxProfitSharingReceiver profitSharingReceiver = wxProfitSharingReceiverMapper.selectById(wxProfitSharingReceiver.getId());
// profitSharingReceiver.setIsUse(wxProfitSharingReceiver.getIsUse());
// profitSharingReceiver.setUpdateTime(new Date());
// wxProfitSharingReceiverMapper.updateById(profitSharingReceiver);
//
// Long merchantId = profitSharingReceiver.getMerchantId();
// String accout = profitSharingReceiver.getReceiverAccount();
// WxMerchant wxMerchant = wxMerchantMapper.selectById(merchantId);
// String linkPhone = wxMerchant.getLinkPhone();
// String merchantName = wxMerchant.getName();
// String tenantId = wxProfitSharingReceiver.getTenantId();
// if (StringUtils.isEmpty(linkPhone)) {
// return new ResultData(Result.SUCCESS, "操作成功");
// }
// //发信息
// Integer isUse = wxProfitSharingReceiver.getIsUse();
// Integer type = EnumMsgModel.ACCEPT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode();
// if (isUse.equals(EnumProfitSharingUse.NO.getCode())) {
// type = EnumMsgModel.REJECT_SHARING_ACCOUNT_NOTIFY_MANAGER.getCode();
// }
// wxProfitSharingReceiverService.sendMsg(linkPhone, accout, merchantName, null, type, wxMerchant);
// return new ResultData(Result.SUCCESS, "操作成功");
// }

@Override
public boolean hasMerchant(WxMerchant wxMerchant) {
@@ -999,6 +999,18 @@ public class WxMerchantServiceImpl implements WxMerchantService {
}
}
}

List<Long> isUseMerchantIds = new ArrayList<Long>();
if(record.getIsUse() != null){
WxProfitSharingReceiver wxProfitSharingReceiver = new WxProfitSharingReceiver();
wxProfitSharingReceiver.updateTenantInfo(record);
wxProfitSharingReceiver.setSharingType(EnumProfitSharingType.PROFIT_SHARING_TYPE_DOUYIN.getCode());
wxProfitSharingReceiver.setStatus(EnumProfitSharingReceiverStatus.PROFIT_SHARING_RECEIVER_STATUS_VALID.getCode());
wxProfitSharingReceiver.setPlat(EnumAppPlat.TOUTIAO.getCode());
wxProfitSharingReceiver.setIsUse(EnumProfitSharingUse.YES.getCode());
isUseMerchantIds = wxProfitSharingReceiverMapper.findMerchantIdList(wxProfitSharingReceiver);
}

List<Long> merchantIds = new ArrayList<Long>();
String phone = StringUtils.trimToNull(record.getPhone());
if (null != phone) {
@@ -1025,10 +1037,20 @@ public class WxMerchantServiceImpl implements WxMerchantService {
merchantIds.addAll(floorMerchantIds);
}
}

if(EnumProfitSharingUse.YES.getCode().equals(record.getIsUse())){
if(merchantIds.size() > 0){
merchantIds.retainAll(isUseMerchantIds);
}else{
merchantIds.addAll(isUseMerchantIds);
}
}

if (merchantIds.size() > 0 ) {
record.setIds(merchantIds);
}

List<Long> noMerchantIds = new ArrayList<Long>();
Integer rentShopType = record.getRentShopType();
if (null != rentShopType) {
WxRentContract rentContractQ = new WxRentContract();
@@ -1036,9 +1058,21 @@ public class WxMerchantServiceImpl implements WxMerchantService {
rentContractQ.setStatuss(EnumRentContractStatus.getValidStatus());
List<Long> usedMerchantIds = wxRentContractMapper.getMerchantIdsByStatuss(rentContractQ);
if (null != usedMerchantIds && usedMerchantIds.size() >0 ) {
record.setNotInids(usedMerchantIds);
noMerchantIds.addAll(usedMerchantIds);
// record.setNotInids(usedMerchantIds);
}
}
if(EnumProfitSharingUse.NO.getCode().equals(record.getIsUse())){
if(noMerchantIds.size() > 0){
noMerchantIds.retainAll(isUseMerchantIds);
}else{
noMerchantIds.addAll(isUseMerchantIds);
}
}

if(noMerchantIds.size() > 0){
record.setNotInids(noMerchantIds);
}
}
@Override


+ 7
- 2
mallinkService/src/main/resources/mapper/WxProfitSharingReceiverMapper.xml Dosyayı Görüntüle

@@ -125,8 +125,13 @@
<include refid="dynamicWhereConditions"/>
limit 0,1
</select>


<select id="findMerchantIdList" parameterType="com.iformall.domain.po.WxProfitSharingReceiver" resultType="Long">
select `merchant_id`
from wx_profit_sharing_receiver
<include refid="dynamicWhereConditions"/>
</select>
</mapper>

+ 8
- 8
mallinkTTAdmin/src/main/java/com/iformall/controller/basic/WxMerchantController.java Dosyayı Görüntüle

@@ -265,14 +265,14 @@ public class WxMerchantController extends BaseController {
return wxMerchantService.top(wxMerchant);
}

@ApiOperation("更新收款账户状态")
@PostMapping("useAccount")
@SystemControllerLog(description = "商户-更新收款账户状态")
public ResultData useAccount(@RequestBody WxProfitSharingReceiver wxProfitSharingReceiver) {
logger.debug("[" + getIpAddr() + "] WxMerchantController::useAccount");
wxProfitSharingReceiver.updateTenantInfo(getTenantInfo());
return wxMerchantService.useAccount(wxProfitSharingReceiver);
}
// @ApiOperation("更新收款账户状态")
// @PostMapping("useAccount")
// @SystemControllerLog(description = "商户-更新收款账户状态")
// public ResultData useAccount(@RequestBody WxProfitSharingReceiver wxProfitSharingReceiver) {
// logger.debug("[" + getIpAddr() + "] WxMerchantController::useAccount");
// wxProfitSharingReceiver.updateTenantInfo(getTenantInfo());
// return wxMerchantService.useAccount(wxProfitSharingReceiver);
// }

@ApiOperation("查看是否存在商户名称相同记录")
@GetMapping("/hasMerchant")


Yükleniyor…
İptal
Kaydet