通知中心接口修改

This commit is contained in:
张松 2025-04-07 10:13:33 +08:00
parent b45a2bd82f
commit 772c947808
8 changed files with 35 additions and 28 deletions

View File

@ -13,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
/** /**
* 通知中心-同步消息
* @author Administrator * @author Administrator
*/ */
@RestController @RestController

View File

@ -121,8 +121,8 @@ public class ShopVendorController {
*/ */
@GetMapping("/bill") @GetMapping("/bill")
// @OperationLog("供应商账单-列表") // @OperationLog("供应商账单-列表")
public CzgResult<Page<ShopVendorBillVO>> bill() { public CzgResult<Page<ShopVendorBillVO>> bill(@RequestParam(required = false) String key) {
return CzgResult.success(shopVendorService.billList(StpKit.USER.getShopId())); return CzgResult.success(shopVendorService.billList(StpKit.USER.getShopId(), key));
} }
/** /**
@ -131,8 +131,8 @@ public class ShopVendorController {
*/ */
@GetMapping("/bill/record") @GetMapping("/bill/record")
// @OperationLog("供应商账单-列表") // @OperationLog("供应商账单-列表")
public CzgResult<Page<ShopVendorBillRecordVO>> bill(@RequestParam Integer vendorId) { public CzgResult<Page<ShopVendorBillRecordVO>> bill(@RequestParam Integer vendorId, @RequestParam(required = false) String key) {
return CzgResult.success(shopVendorService.billRecord(StpKit.USER.getShopId(), vendorId)); return CzgResult.success(shopVendorService.billRecord(StpKit.USER.getShopId(), vendorId, key));
} }

View File

@ -70,7 +70,7 @@ public interface ShopVendorService extends IService<ShopVendor> {
* @param shopId 店铺id * @param shopId 店铺id
* @return 账单 * @return 账单
*/ */
Page<ShopVendorBillVO> billList(Long shopId); Page<ShopVendorBillVO> billList(Long shopId, String key);
/** /**
* 账单记录明细 * 账单记录明细
@ -79,7 +79,7 @@ public interface ShopVendorService extends IService<ShopVendor> {
* @param vendorId 供应商id * @param vendorId 供应商id
* @return 分页 * @return 分页
*/ */
Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId); Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId, String key);
/** /**
* 账单付款 * 账单付款

View File

@ -21,7 +21,7 @@ import java.util.List;
public interface ConsStockFlowMapper extends BaseMapper<ConsStockFlow> { public interface ConsStockFlowMapper extends BaseMapper<ConsStockFlow> {
ConsStatisticsVo getConsStatistics(ConsInfoParam param); ConsStatisticsVo getConsStatistics(ConsInfoParam param);
List<ShopVendorBillRecordVO> selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId); List<ShopVendorBillRecordVO> selectByVendorId(@Param("shopId") Long shopId, @Param("vendorId") Integer vendorId, @Param("key") String key);
List<ConsStockFlow> selectUnPaid(@Param("shopId") Long shopId, @Param("vendorIds") @NotEmpty List<Long> vendorIds); List<ConsStockFlow> selectUnPaid(@Param("shopId") Long shopId, @Param("vendorIds") @NotEmpty List<Long> vendorIds);
} }

View File

@ -21,5 +21,5 @@ public interface ShopVendorMapper extends BaseMapper<ShopVendor> {
ShopVendorSummaryVO summary(@Param("shopId") Long shopId); ShopVendorSummaryVO summary(@Param("shopId") Long shopId);
List<ShopVendorBillVO> bill(@Param("shopId") Long shopId); List<ShopVendorBillVO> bill(@Param("shopId") Long shopId, @Param("key") String key);
} }

View File

@ -122,15 +122,15 @@ public class ShopVendorServiceImpl extends ServiceImpl<ShopVendorMapper, ShopVen
} }
@Override @Override
public Page<ShopVendorBillVO> billList(Long shopId) { public Page<ShopVendorBillVO> billList(Long shopId, String key) {
PageHelper.startPage(PageUtil.buildPageHelp()); PageHelper.startPage(PageUtil.buildPageHelp());
return PageUtil.convert(new PageInfo<>(mapper.bill(shopId))); return PageUtil.convert(new PageInfo<>(mapper.bill(shopId, key)));
} }
@Override @Override
public Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId) { public Page<ShopVendorBillRecordVO> billRecord(Long shopId, Integer vendorId, String key) {
PageHelper.startPage(PageUtil.buildPageHelp()); PageHelper.startPage(PageUtil.buildPageHelp());
return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId))); return PageUtil.convert(new PageInfo<>(consStockFlowMapper.selectByVendorId(shopId, vendorId, key)));
} }
@Override @Override

View File

@ -48,6 +48,9 @@
FROM tb_cons_stock_flow FROM tb_cons_stock_flow
WHERE shop_id = #{shopId} WHERE shop_id = #{shopId}
and vendor_id = #{vendorId} and vendor_id = #{vendorId}
<if test="key != null and key != ''">
and `name` like concat('%', #{key}, '%')
</if>
</select> </select>
<select id="selectUnPaid" resultType="com.czg.product.entity.ConsStockFlow"> <select id="selectUnPaid" resultType="com.czg.product.entity.ConsStockFlow">

View File

@ -31,6 +31,9 @@
from tb_cons_stock_flow from tb_cons_stock_flow
left join tb_shop_vendor on tb_cons_stock_flow.vendor_id = tb_shop_vendor.id left join tb_shop_vendor on tb_cons_stock_flow.vendor_id = tb_shop_vendor.id
where tb_cons_stock_flow.shop_id = #{shopId} where tb_cons_stock_flow.shop_id = #{shopId}
<if test="key != null and key != ''">
and tb_shop_vendor.`name` like concat('%', #{key}, '%')
</if>
GROUP BY tb_cons_stock_flow.vendor_id GROUP BY tb_cons_stock_flow.vendor_id
</select> </select>
</mapper> </mapper>