update:
1.change category attribution
This commit is contained in:
@@ -167,8 +167,9 @@ public class PriceListController extends BladeController {
|
||||
@GetMapping("/detail-list")
|
||||
@ApiOperationSupport(order = 10)
|
||||
@Operation(summary = "详情列表", description = "传入priceList")
|
||||
public R<List<PriceListVO>> detailList(PriceListVO priceList) {
|
||||
return R.data(priceListService.selectDetailList(priceList));
|
||||
public R<IPage<PriceListVO>> detailList(PriceListVO priceList, Query query) {
|
||||
IPage<PriceListVO> pages = priceListService.selectDetailList(Condition.getPage(query),priceList);
|
||||
return R.data(pages);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -25,6 +25,7 @@
|
||||
*/
|
||||
package org.springblade.modules.kiosk.mapper;
|
||||
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springblade.modules.kiosk.pojo.entity.PriceListEntity;
|
||||
import org.springblade.modules.kiosk.pojo.vo.PriceListSummaryVO;
|
||||
import org.springblade.modules.kiosk.pojo.vo.PriceListVO;
|
||||
@@ -55,5 +56,5 @@ public interface PriceListMapper extends BaseMapper<PriceListEntity> {
|
||||
|
||||
List<PriceListSummaryVO> selectSummaryListPage(IPage page, Long deptId);
|
||||
|
||||
List<PriceListVO> selectPriceList(PriceListVO priceList);
|
||||
List<PriceListVO> selectPriceList(IPage page, PriceListVO priceList);
|
||||
}
|
||||
|
||||
@@ -46,7 +46,10 @@
|
||||
and kpl.material = #{priceList.material}
|
||||
</if>
|
||||
<if test="priceList.csize !=null">
|
||||
and kpl.size = #{csize}
|
||||
and kpl.size = #{priceList.csize}
|
||||
</if>
|
||||
<if test="priceList.style !=null">
|
||||
and kpl.style = #{priceList.style}
|
||||
</if>
|
||||
order by kpl.original_price, kc.type
|
||||
</select>
|
||||
@@ -104,12 +107,14 @@
|
||||
</insert>
|
||||
|
||||
<insert id="initShelfByCrossJoin">
|
||||
INSERT INTO kiosk_price_list (category_id, shape, material, size, dept_id, tenant_id, create_user, create_dept,
|
||||
INSERT INTO kiosk_price_list (category_id, shape, material, size, style, dept_id, tenant_id, create_user,
|
||||
create_dept,
|
||||
create_time, update_user, update_time)
|
||||
SELECT c.id AS category_id,
|
||||
CAST(sh.dict_key AS SIGNED) AS shape,
|
||||
CAST(m.dict_key AS SIGNED) AS material,
|
||||
CAST(s.dict_key AS SIGNED) AS size,
|
||||
CAST(st.dict_key AS SIGNED) AS style,
|
||||
#{targetDept} AS dept_id,
|
||||
#{tenantId} AS tenant_id,
|
||||
#{userId},
|
||||
@@ -124,6 +129,8 @@
|
||||
ON s.code = 'size_type' AND s.tenant_id = #{tenantId} and s.parent_id != 0
|
||||
CROSS JOIN blade_dict_biz sh
|
||||
ON sh.code = 'shape_type' AND sh.tenant_id = #{tenantId} and sh.parent_id != 0
|
||||
CROSS JOIN blade_dict_biz st
|
||||
ON sh.code = 'style_type' AND sh.tenant_id = #{tenantId} and sh.parent_id != 0
|
||||
WHERE c.is_deleted = 0
|
||||
AND c.tenant_id = #{tenantId}
|
||||
AND c.type = 1
|
||||
|
||||
@@ -68,10 +68,14 @@ public class PriceListApiVO implements Serializable {
|
||||
|
||||
private Boolean sizeUpgrade;
|
||||
|
||||
private Integer sizeUpgradeTo;
|
||||
|
||||
private BigDecimal sizeUpgradePrice;
|
||||
|
||||
private Boolean materialUpgrade;
|
||||
|
||||
private Integer materialUpgradeTo;
|
||||
|
||||
private BigDecimal materialUpgradePrice;
|
||||
|
||||
private Boolean stand;
|
||||
|
||||
@@ -31,8 +31,6 @@ import org.springblade.modules.kiosk.pojo.vo.PriceListVO;
|
||||
import com.baomidou.mybatisplus.core.metadata.IPage;
|
||||
import org.springblade.core.mp.base.BaseService;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 自助终端价格表 服务类
|
||||
*
|
||||
@@ -53,7 +51,7 @@ public interface IPriceListService extends BaseService<PriceListEntity> {
|
||||
|
||||
IPage<PriceListSummaryVO> selectSummaryListPage(IPage<PriceListSummaryVO> page, Long deptId);
|
||||
|
||||
List<PriceListVO> selectDetailList(PriceListVO priceList);
|
||||
IPage<PriceListVO> selectDetailList(IPage<PriceListVO> page, PriceListVO priceList);
|
||||
|
||||
boolean savePriceList(PriceListEntity priceList);
|
||||
}
|
||||
|
||||
@@ -370,8 +370,10 @@ public class KioskServiceImpl implements IKioskApiService {
|
||||
vo.setBackPrint(p.getBackPrint() == 1 ? Boolean.TRUE : Boolean.FALSE);
|
||||
vo.setBackPrintPrice(p.getBackPrintPrice());
|
||||
vo.setSizeUpgrade(p.getSizeUpgrade() == 1 ? Boolean.TRUE : Boolean.FALSE);
|
||||
vo.setSizeUpgradeTo(p.getSizeUpgradeTo());
|
||||
vo.setSizeUpgradePrice(p.getSizeUpgradePrice());
|
||||
vo.setMaterialUpgrade(p.getMaterialUpgrade() == 1 ? Boolean.TRUE : Boolean.FALSE);
|
||||
vo.setMaterialUpgradeTo(p.getMaterialUpgradeTo());
|
||||
vo.setMaterialUpgradePrice(p.getMaterialUpgradePrice());
|
||||
vo.setStand(p.getStand() == 1 ? Boolean.TRUE : Boolean.FALSE);
|
||||
vo.setStandPrice(p.getStandPrice());
|
||||
|
||||
@@ -68,7 +68,7 @@ public class PriceListServiceImpl extends BaseServiceImpl<PriceListMapper, Price
|
||||
if (dept == null || !Objects.equals(dept.getTenantId(), AuthUtil.getTenantId())) {
|
||||
throw new ServiceException("Invalid parameters");
|
||||
}
|
||||
baseMapper.initWallByCrossJoin(AuthUtil.getTenantId(), deptId, Long.valueOf(AuthUtil.getDeptId()), AuthUtil.getUserId());
|
||||
// baseMapper.initWallByCrossJoin(AuthUtil.getTenantId(), deptId, Long.valueOf(AuthUtil.getDeptId()), AuthUtil.getUserId());
|
||||
baseMapper.initShelfByCrossJoin(AuthUtil.getTenantId(), deptId, Long.valueOf(AuthUtil.getDeptId()), AuthUtil.getUserId());
|
||||
return true;
|
||||
}
|
||||
@@ -79,8 +79,8 @@ public class PriceListServiceImpl extends BaseServiceImpl<PriceListMapper, Price
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<PriceListVO> selectDetailList(PriceListVO priceList) {
|
||||
return baseMapper.selectPriceList(priceList);
|
||||
public IPage<PriceListVO> selectDetailList(IPage<PriceListVO> page, PriceListVO priceList){
|
||||
return page.setRecords(baseMapper.selectPriceList(page, priceList));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user