master:管理员账号返回档口列表数据调整;
parent
473f3745a4
commit
eac89b3d11
|
|
@ -3,6 +3,8 @@ package com.ruoyi.xkt.dto.store;
|
|||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @author liujiang
|
||||
* @version v1.0
|
||||
|
|
@ -27,5 +29,9 @@ public class StorePageResDTO {
|
|||
private String delFlag;
|
||||
@ApiModelProperty(value = "档口权重")
|
||||
private Integer storeWeight;
|
||||
@ApiModelProperty(value = "年费金额")
|
||||
private BigDecimal serviceAmount;
|
||||
@ApiModelProperty(value = "会员金额")
|
||||
private BigDecimal memberAmount;
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -92,6 +92,17 @@ public class StoreServiceImpl implements IStoreService {
|
|||
public Page<StorePageResDTO> page(StorePageDTO pageDTO) {
|
||||
PageHelper.startPage(pageDTO.getPageNum(), pageDTO.getPageSize());
|
||||
List<StorePageResDTO> storeList = this.storeMapper.selectStorePage(pageDTO);
|
||||
if (CollectionUtils.isNotEmpty(storeList)) {
|
||||
// 如果没有年费金额 或 会员金额 则设置默认值
|
||||
storeList.forEach(store -> {
|
||||
if (ObjectUtils.isEmpty(store.getServiceAmount())) {
|
||||
store.setServiceAmount(Constants.STORE_ANNUAL_AMOUNT);
|
||||
}
|
||||
if (ObjectUtils.isEmpty(store.getMemberAmount())) {
|
||||
store.setMemberAmount(Constants.STORE_MEMBER_AMOUNT);
|
||||
}
|
||||
});
|
||||
}
|
||||
return Page.convert(new PageInfo<>(storeList));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -13,7 +13,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
s.contact_back_phone,
|
||||
s.store_status,
|
||||
s.del_flag,
|
||||
s.store_weight
|
||||
s.store_weight,
|
||||
s.service_amount,
|
||||
s.member_amount
|
||||
FROM
|
||||
store s JOIN sys_user u ON s.user_id = u.user_id
|
||||
<if test="storeName != null and storeName != ''"> and s.store_name like concat('%', #{storeName}, '%')</if>
|
||||
|
|
|
|||
Loading…
Reference in New Issue