This commit is contained in:
cun-nan 2024-03-07 11:01:35 +08:00
parent 8abf91600e
commit 8fb0f54ce4
2 changed files with 7 additions and 1 deletions

View File

@ -108,7 +108,7 @@ public class ActiveDiscountController extends BaseController {
* @return * @return
*/ */
@DeleteMapping("delById/{ids}") @DeleteMapping("delById/{ids}")
public ResponseObject delete(@PathVariable Long ids) { public ResponseObject delete(@PathVariable Integer ids) {
return getSuccessResult(this.activeDiscountService.removeById(ids)); return getSuccessResult(this.activeDiscountService.removeById(ids));
} }

View File

@ -22,7 +22,9 @@ import com.fuint.business.petrolStationManagement.entity.OilName;
import com.fuint.business.petrolStationManagement.service.OilNameService; import com.fuint.business.petrolStationManagement.service.OilNameService;
import com.fuint.business.store.service.StoreService; import com.fuint.business.store.service.StoreService;
import com.fuint.business.userManager.service.LJUserGradeService; import com.fuint.business.userManager.service.LJUserGradeService;
import com.fuint.common.service.AccountService;
import com.fuint.common.util.TokenUtil; import com.fuint.common.util.TokenUtil;
import com.fuint.repository.model.TAccount;
import org.apache.commons.lang3.ObjectUtils; import org.apache.commons.lang3.ObjectUtils;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
@ -56,6 +58,8 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
private OilNameService oilNameService; private OilNameService oilNameService;
@Resource @Resource
private ActiveDiscountMapper activeDiscountMapper; private ActiveDiscountMapper activeDiscountMapper;
@Resource
private AccountService accountService;
/** /**
* 新增数据 * 新增数据
* @param activeDiscountDTO * @param activeDiscountDTO
@ -161,6 +165,8 @@ public class ActiveDiscountServiceImpl extends ServiceImpl<ActiveDiscountMapper,
activeDiscountVO.setDieselUserLevel(str.split(",")); activeDiscountVO.setDieselUserLevel(str.split(","));
} }
activeDiscountVO.setActiveDiscountChildList(activeDiscountChildList); activeDiscountVO.setActiveDiscountChildList(activeDiscountChildList);
TAccount accountInfoById = accountService.getAccountInfoById(Integer.parseInt(s.getCreateBy()));
if (ObjectUtil.isNotEmpty(accountInfoById)) activeDiscountVO.setCreateBy(accountInfoById.getRealName());
return activeDiscountVO; return activeDiscountVO;
}).collect(Collectors.toList()); }).collect(Collectors.toList());
page1.setRecords(activeConsumptionVOList); page1.setRecords(activeConsumptionVOList);