|
|
|
@@ -15,6 +15,7 @@ import com.iformall.exception.MallinkException; |
|
|
|
import com.iformall.service.WxCUserBasicInfoService; |
|
|
|
import com.iformall.service.WxCreditHistoryService; |
|
|
|
import com.iformall.service.WxMerchantService; |
|
|
|
import com.iformall.utils.UserUtil; |
|
|
|
import io.swagger.annotations.Api; |
|
|
|
import io.swagger.annotations.ApiImplicitParam; |
|
|
|
import io.swagger.annotations.ApiImplicitParams; |
|
|
|
@@ -25,6 +26,7 @@ import org.springframework.beans.factory.annotation.Autowired; |
|
|
|
import org.springframework.web.bind.annotation.*; |
|
|
|
|
|
|
|
import java.util.List; |
|
|
|
import java.util.Map; |
|
|
|
import java.util.Objects; |
|
|
|
|
|
|
|
@RestController |
|
|
|
@@ -61,7 +63,14 @@ public class WxCreditHistoryController extends BaseController { |
|
|
|
if(Objects.isNull(merchantId)|| StringUtils.isEmpty(spendStr)||Objects.isNull(userId)) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL) ; |
|
|
|
} |
|
|
|
return new ResultData(wxCreditHistoryService.findByMerchantIdAndSpend(merchantId,spendStr,userId,getTenantId())); |
|
|
|
try { |
|
|
|
Map<String, Integer> result = wxCreditHistoryService.findByMerchantIdAndSpend(merchantId, spendStr, userId, getTenantId()); |
|
|
|
return new ResultData(result); |
|
|
|
} catch (MallinkException e) { |
|
|
|
return new ResultData(e.getErrorCode(), e.getMessage()); |
|
|
|
} catch (Exception e) { |
|
|
|
return new ResultData(ErrorCode.SYS_PARAMETER_ERROR, e.getMessage()); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
@ApiOperation("根据手机号查询接口") |
|
|
|
@@ -104,7 +113,7 @@ public class WxCreditHistoryController extends BaseController { |
|
|
|
//B端操作用户 |
|
|
|
wxCreditHistory.setOperatorType(EnumUserType.BUSER.getCode()); |
|
|
|
try { |
|
|
|
wxCreditHistoryService.check(wxCreditHistory.getCUserId()); |
|
|
|
wxCreditHistoryService.creditUsercheck(wxCreditHistory.getCUserId()); |
|
|
|
WxCreditHistory credit = wxCreditHistoryService.saveOrUpdate(wxCreditHistory); |
|
|
|
return new ResultData(Result.SUCCESS, "操作成功", credit); |
|
|
|
} catch (MallinkException e) { |
|
|
|
|