This commit is contained in:
齐天大圣 2024-03-07 16:23:33 +08:00
parent 6c0a35ca3e
commit 42f76872b8
4 changed files with 14 additions and 10 deletions

View File

@ -41,7 +41,7 @@ public class ActiveDiscountController extends BaseController {
* @return
*/
@GetMapping
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
public ResponseObject selectAll(@RequestParam(value = "pageNum",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") ActiveDiscount activeDiscount) {
Page page = new Page(pageNo, pageSize);

View File

@ -21,6 +21,7 @@ import com.fuint.business.marketingActivity.activeDiscount.vo.ActiveDiscountVO;
import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.service.AccountService;
import com.fuint.common.util.TokenUtil;
@ -145,7 +146,7 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
.map(Integer::valueOf)
.toArray(Integer[]::new));
}
String oilName = "";
/*String oilName = "";
if (ObjectUtils.isNotEmpty(activeDiscountVO.getAdaptOil())) {
for (Integer integer : activeDiscountVO.getAdaptOil()) {
OilName oilNames = oilNameService.selectOilNameById(integer);
@ -156,13 +157,14 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
if (oilName.endsWith(",")) { // 判断字符串是否以逗号结尾
oilName = oilName.substring(0, oilName.length() - 1); // 截取去除最后一个字符之前的子串
}
activeDiscountVO.setAdaptOilss(oilName);
activeDiscountVO.setAdaptOilss(oilName);*/
//获取会员等级
String str = "";
if (ObjectUtils.isNotEmpty(s.getDieselUserLevel())){
for (String gradeId : s.getDieselUserLevel().split(",")) {
if (ObjectUtils.isNotEmpty(userGradeService.selectUserGradeById(Integer.parseInt(gradeId)))){
str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ",";
LJUserGrade ljUserGrade = userGradeService.selectUserGradeByGradeId(Integer.parseInt(gradeId));
if (ObjectUtils.isNotEmpty(ljUserGrade)){
str += ljUserGrade.getName() + ",";
}
}
activeDiscountVO.setDieselUserLevel(str.split(","));

View File

@ -42,7 +42,7 @@ public class ActiveFullminusController extends BaseController {
* @return
*/
@GetMapping
public ResponseObject selectAll(@RequestParam(value = "pageNo",defaultValue = "1") Integer pageNo,
public ResponseObject selectAll(@RequestParam(value = "pageNum",defaultValue = "1") Integer pageNo,
@RequestParam(value = "pageSize",defaultValue = "10") Integer pageSize,
@Param("cardFuelDiesel") ActiveFullminus activeFullminus) {
Page page = new Page(pageNo, pageSize);

View File

@ -20,6 +20,7 @@ import com.fuint.business.marketingActivity.activeFullminus.vo.ActiveFullminusVO
import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.entity.LJUserGrade;
import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.service.AccountService;
import com.fuint.common.util.TokenUtil;
@ -137,7 +138,7 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
activeFullminusVO.setAdaptOil(Arrays.stream(s.getAdaptOil().split(","))
.map(Integer::valueOf)
.toArray(Integer[]::new));
String oilName = "";
/* String oilName = "";
for (Integer integer : activeFullminusVO.getAdaptOil()) {
OilName oilNames = oilNameService.selectOilNameById(integer);
oilName += oilNames.getOilType() + "-"+oilNames.getOilName() + ",";
@ -146,13 +147,14 @@ public class ActiveFullminusServiceImpl extends ServiceImpl<ActiveFullminusMappe
if (oilName.endsWith(",")) { // 判断字符串是否以逗号结尾
oilName = oilName.substring(0, oilName.length() - 1); // 截取去除最后一个字符之前的子串
}
activeFullminusVO.setAdaptOilss(oilName);
activeFullminusVO.setAdaptOilss(oilName);*/
//获取会员等级
String str = "";
if (ObjectUtils.isNotEmpty(s.getDieselUserLevel())){
for (String gradeId : s.getDieselUserLevel().split(",")) {
if (ObjectUtils.isNotEmpty(userGradeService.selectUserGradeById(Integer.parseInt(gradeId)))){
str += userGradeService.selectUserGradeById(Integer.parseInt(gradeId)).getName() + ",";
LJUserGrade ljUserGrade = userGradeService.selectUserGradeByGradeId(Integer.parseInt(gradeId));
if (ObjectUtils.isNotEmpty(ljUserGrade)){
str += ljUserGrade.getName() + ",";
}
}
activeFullminusVO.setDieselUserLevel(str.split(","));