|
@@ -13,6 +13,7 @@ import com.caimei.service.vip.VipService;
|
|
|
import com.github.pagehelper.PageHelper;
|
|
|
import com.github.pagehelper.PageInfo;
|
|
|
import lombok.extern.slf4j.Slf4j;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
@@ -36,8 +37,6 @@ public class VipServiceImpl implements VipService {
|
|
|
private SysMenuService sysMenuService;
|
|
|
@Resource
|
|
|
private SysUserService sysUserService;
|
|
|
- @Resource
|
|
|
- private SysRoleService sysRoleService;
|
|
|
|
|
|
@Override
|
|
|
public ResponseJson<Integer> payVip(Integer authUserId, Integer packageId, String services, Integer payWay, Integer payStatus, Date payTime) {
|
|
@@ -83,7 +82,15 @@ public class VipServiceImpl implements VipService {
|
|
|
vipHistory.setPayStatus(payStatus);
|
|
|
vipHistory.setPayWay(payWay);
|
|
|
vipHistory.setPrice(packageVo.getPrice());
|
|
|
- vipHistory.setServices(services);
|
|
|
+ String[] serviceIdArr = services.split(",");
|
|
|
+ String serviceNames = "";
|
|
|
+ for (String serviceId : serviceIdArr) {
|
|
|
+ String serviceName = vipMapper.getVipServiceName(serviceId);
|
|
|
+ if (StringUtils.isNotEmpty(serviceName)) {
|
|
|
+ serviceNames += "".equals(serviceNames) ? serviceName : "," + serviceName;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ vipHistory.setServices(serviceNames);
|
|
|
vipHistory.setPayTime(payTime);
|
|
|
if (null != dbHistoryId) {
|
|
|
vipHistory.setId(dbHistoryId);
|
|
@@ -220,8 +227,6 @@ public class VipServiceImpl implements VipService {
|
|
|
public ResponseJson vipMenusConfigure(List<Map<String, Object>> baseMenuList, List<Map<String, Object>> upMenuList) {
|
|
|
systemMapper.deleteRoleMenuRelation(1);
|
|
|
systemMapper.deleteRolePermissionRelation(1);
|
|
|
- systemMapper.deleteRoleMenuRelation(2);
|
|
|
- systemMapper.deleteRolePermissionRelation(2);
|
|
|
Set<Integer> baseMenuIdSet = new HashSet<>();
|
|
|
Set<Integer> basePermissionIdSet = new HashSet<>();
|
|
|
for (Map<String,Object> menu : baseMenuList) {
|