给首页的金额进行权限控制
This commit is contained in:
@@ -224,18 +224,18 @@ public class RoleService {
|
||||
* @param type
|
||||
* @return
|
||||
*/
|
||||
public Object parsePriceByLimit(BigDecimal price, String type, HttpServletRequest request) throws Exception {
|
||||
public Object parsePriceByLimit(BigDecimal price, String type, String emptyInfo, HttpServletRequest request) throws Exception {
|
||||
Long userId = userService.getUserId(request);
|
||||
String priceLimit = userService.getRoleTypeByUserId(userId).getPriceLimit();
|
||||
if(StringUtil.isNotEmpty(priceLimit)) {
|
||||
if("buy".equals(type) && priceLimit.contains("1")) {
|
||||
return "***";
|
||||
return emptyInfo;
|
||||
}
|
||||
if("retail".equals(type) && priceLimit.contains("2")) {
|
||||
return "***";
|
||||
return emptyInfo;
|
||||
}
|
||||
if("sale".equals(type) && priceLimit.contains("3")) {
|
||||
return "***";
|
||||
return emptyInfo;
|
||||
}
|
||||
}
|
||||
return price;
|
||||
|
||||
Reference in New Issue
Block a user