资源位-规则-是否大R
This commit is contained in:
@@ -33,7 +33,9 @@ public class AdminResourceController {
|
||||
@ApiImplicitParam(name = "type", value = "资源类型", required = true)
|
||||
@ApiOperation("分页列表")
|
||||
@GetMapping("page")
|
||||
public BusiResult<IPage<Resource>> page(@RequestParam("type") Integer type, @RequestParam(value = "partitionId", required = false) Integer partitionId, PageReq req) {
|
||||
public BusiResult<IPage<Resource>> page(@RequestParam("type") Integer type,
|
||||
@RequestParam(value = "partitionId", required = false) Integer partitionId,
|
||||
PageReq req) {
|
||||
return BusiResult.success(adminResourceService.page(type, partitionId, req.getPage(), req.getPageSize()));
|
||||
}
|
||||
|
||||
|
@@ -25,6 +25,11 @@ public class HighRechargeUserService extends ServiceImpl<HighRechargeUserMapper,
|
||||
|
||||
private final BigDecimal GOLD_LOW_LIMIT = new BigDecimal("700000");
|
||||
|
||||
public boolean isHighRechargeUser(Long uid) {
|
||||
HighRechargeUser hru = getBaseMapper().selectById(uid);
|
||||
return null != hru && Constant.StatusV2.valid.equals(hru.getType());
|
||||
}
|
||||
|
||||
public void statistics(Long uid, BigDecimal totalReceiveGoldNum) {
|
||||
Users u = usersBaseService.getUsersByUid(uid);
|
||||
if (null == u || rechargeUserService.isRechargeUser(u.getUid())){
|
||||
|
@@ -50,4 +50,6 @@ public class ResourceContext {
|
||||
*/
|
||||
private String userPhone;
|
||||
|
||||
private String highRechargeUser;
|
||||
|
||||
}
|
||||
|
@@ -25,6 +25,7 @@ import com.accompany.core.enumeration.PartitionEnum;
|
||||
import com.accompany.core.model.Users;
|
||||
import com.accompany.core.service.user.UsersBaseService;
|
||||
import com.accompany.core.vo.SplashVo;
|
||||
import com.accompany.payment.service.HighRechargeUserService;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.toolkit.Wrappers;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
@@ -61,6 +62,9 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> i
|
||||
@Autowired
|
||||
private FillFactory fillFactory;
|
||||
|
||||
@Autowired
|
||||
private HighRechargeUserService highRechargeUserService;
|
||||
|
||||
@Override
|
||||
public boolean isOpen(String code) {
|
||||
return getResource(code) != null;
|
||||
@@ -104,6 +108,8 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> i
|
||||
}
|
||||
partitionId = users.getPartitionId();
|
||||
}
|
||||
boolean isHighRechargeUser = highRechargeUserService.isHighRechargeUser(uid);
|
||||
context.setHighRechargeUser(isHighRechargeUser? "大R": "普通");
|
||||
}
|
||||
List<Resource> resources = list(Wrappers.<Resource>lambdaQuery()
|
||||
.eq(type != null, Resource::getType, type)
|
||||
@@ -177,7 +183,7 @@ public class ResourceServiceImpl extends ServiceImpl<ResourceMapper, Resource> i
|
||||
log.error(e.getMessage());
|
||||
continue;
|
||||
}
|
||||
log.info("fieldName : {}, ruleValue : {}, targetValue : {}", fieldName, ruleValue, targetValue);
|
||||
//log.info("fieldName : {}, ruleValue : {}, targetValue : {}", fieldName, ruleValue, targetValue);
|
||||
if (targetValue == null) {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user