|
|
|
@@ -9,10 +9,13 @@ import com.iformall.controller.base.BaseController; |
|
|
|
import com.iformall.domain.po.BaseEntity; |
|
|
|
import com.iformall.domain.po.WxMerchant; |
|
|
|
import com.iformall.domain.po.WxProfitSharingReceiver; |
|
|
|
import com.iformall.domain.po.WxScoreRules; |
|
|
|
import com.iformall.domain.vo.WxMerchantTradeVo; |
|
|
|
import com.iformall.domain.vo.WxMerchantVo; |
|
|
|
import com.iformall.enums.EnumCreditLockedStatus; |
|
|
|
import com.iformall.service.QrCodeService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.service.WxScoreRulesService; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
import io.swagger.annotations.ApiOperation; |
|
|
|
@@ -38,7 +41,8 @@ public class WxMerchantController extends BaseController { |
|
|
|
private WxMerchantService wxMerchantService; |
|
|
|
@Autowired |
|
|
|
private QrCodeService qrCodeService; |
|
|
|
|
|
|
|
@Autowired |
|
|
|
private WxScoreRulesService wxScoreRulesService; |
|
|
|
|
|
|
|
@UserDataRuleAnnotation("merchant_list") |
|
|
|
@ApiOperation("分页列表接口") |
|
|
|
@@ -102,7 +106,12 @@ public class WxMerchantController extends BaseController { |
|
|
|
public ResultData findById(Long id) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxMerchantController::findById"); |
|
|
|
WxMerchant wxMerchant = wxMerchantService.getById(id); |
|
|
|
|
|
|
|
if (wxMerchant.getCreditLocked() != null) { |
|
|
|
WxScoreRules scoreRules = wxScoreRulesService.getScoreRules(getTenantId()); |
|
|
|
if (scoreRules != null && scoreRules.getCreditLocked().equals(EnumCreditLockedStatus.CLOSE.getCode())) { |
|
|
|
wxMerchant.setCreditLocked(EnumCreditLockedStatus.CLOSE.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
return new ResultData(wxMerchant); |
|
|
|
} |
|
|
|
|
|
|
|
@@ -192,6 +201,12 @@ public class WxMerchantController extends BaseController { |
|
|
|
public ResultData updateMerchantLevel(@RequestBody WxMerchant wxMerchant) { |
|
|
|
logger.debug("[" + getIpAddr() + "] WxMerchantController::updateMerchantLevel"); |
|
|
|
wxMerchant.setTenantId(getTenantId()); |
|
|
|
if (wxMerchant.getCreditLocked() != null) { |
|
|
|
WxScoreRules scoreRules = wxScoreRulesService.getScoreRules(getTenantId()); |
|
|
|
if (scoreRules != null && scoreRules.getCreditLocked().equals(EnumCreditLockedStatus.CLOSE.getCode())) { |
|
|
|
wxMerchant.setCreditLocked(EnumCreditLockedStatus.CLOSE.getCode()); |
|
|
|
} |
|
|
|
} |
|
|
|
return wxMerchantService.updateMerchantLevel(wxMerchant); |
|
|
|
} |
|
|
|
|
|
|
|
|