商品单位-仓库管理

This commit is contained in:
sxu 2025-05-26 18:00:14 +08:00
parent de18455d0c
commit b85adc42d2
3 changed files with 39 additions and 26 deletions

View File

@ -1,5 +1,6 @@
package com.bonus.canteen.core.basic.domain;
import com.bonus.canteen.core.common.utils.FileUrlUtil;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -47,5 +48,8 @@ public class BasicCarouselImage extends BaseEntity {
@ApiModelProperty(value = "用途类型(1-后台;2-APP;3-双屏消费机)")
private String usageType;
public String getImgUrl() {
return FileUrlUtil.getFileUrl(this.imgUrl);
}
}

View File

@ -1,5 +1,6 @@
package com.bonus.canteen.core.supermarket.domain;
import com.bonus.canteen.core.common.utils.FileUrlUtil;
import com.bonus.common.core.annotation.Excel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
@ -32,6 +33,8 @@ public class SupermarketInfo extends BaseEntity {
@ApiModelProperty(value = "区域id")
private Long areaId;
private String areaName;
/** 管理员 */
@Excel(name = "管理员")
@ApiModelProperty(value = "管理员")
@ -113,4 +116,8 @@ public class SupermarketInfo extends BaseEntity {
private String payCodeUrl;
public String getImgUrl() {
return FileUrlUtil.getFileUrl(this.imgUrl);
}
}

View File

@ -7,6 +7,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="supermarketId" column="supermarket_id" />
<result property="supermarketName" column="supermarket_name" />
<result property="areaId" column="area_id" />
<result property="areaName" column="area_name" />
<result property="manager" column="manager" />
<result property="contactTel" column="contact_tel" />
<result property="warehouseId" column="warehouse_id" />
@ -31,42 +32,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectSupermarketInfoVo">
select supermarket_id, supermarket_name, area_id, manager, contact_tel,
warehouse_id, address, img_url, if_print_now, app_sale_mode,
min_delivery_time, select_time_interval, delivery_cost, auto_verify_day,
delivery_way, refund_limit_time, if_relate_drp, meal_code, if_enable_pay_code,
pay_code_url, create_by, create_time, update_by, update_time
from supermarket_info
select si.supermarket_id, si.supermarket_name, si.area_id, si.manager, si.contact_tel,
si.warehouse_id, si.address, si.img_url, si.if_print_now, si.app_sale_mode,
si.min_delivery_time, si.select_time_interval, si.delivery_cost, si.auto_verify_day,
si.delivery_way, si.refund_limit_time, si.if_relate_drp, si.meal_code, si.if_enable_pay_code,
si.pay_code_url, si.create_by, si.create_time, si.update_by, si.update_time, ba.area_name
from supermarket_info si
left join basic_area ba on si.area_id = ba.area_id
</sql>
<select id="selectSupermarketInfoList" parameterType="com.bonus.canteen.core.supermarket.domain.SupermarketInfo" resultMap="SupermarketInfoResult">
<include refid="selectSupermarketInfoVo"/>
<where>
<if test="supermarketName != null and supermarketName != ''"> and supermarket_name like concat('%', #{supermarketName}, '%')</if>
<if test="areaId != null "> and area_id = #{areaId}</if>
<if test="manager != null "> and manager = #{manager}</if>
<if test="contactTel != null and contactTel != ''"> and contact_tel = #{contactTel}</if>
<if test="warehouseId != null "> and warehouse_id = #{warehouseId}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="imgUrl != null and imgUrl != ''"> and img_url = #{imgUrl}</if>
<if test="ifPrintNow != null "> and if_print_now = #{ifPrintNow}</if>
<if test="appSaleMode != null "> and app_sale_mode = #{appSaleMode}</if>
<if test="minDeliveryTime != null "> and min_delivery_time = #{minDeliveryTime}</if>
<if test="selectTimeInterval != null "> and select_time_interval = #{selectTimeInterval}</if>
<if test="deliveryCost != null "> and delivery_cost = #{deliveryCost}</if>
<if test="autoVerifyDay != null "> and auto_verify_day = #{autoVerifyDay}</if>
<if test="deliveryWay != null and deliveryWay != ''"> and delivery_way = #{deliveryWay}</if>
<if test="refundLimitTime != null "> and refund_limit_time = #{refundLimitTime}</if>
<if test="ifRelateDrp != null "> and if_relate_drp = #{ifRelateDrp}</if>
<if test="mealCode != null and mealCode != ''"> and meal_code = #{mealCode}</if>
<if test="ifEnablePayCode != null "> and if_enable_pay_code = #{ifEnablePayCode}</if>
<if test="payCodeUrl != null and payCodeUrl != ''"> and pay_code_url = #{payCodeUrl}</if>
<if test="supermarketName != null and supermarketName != ''"> and si.supermarket_name like concat('%', #{supermarketName}, '%')</if>
<if test="areaId != null "> and si.area_id = #{areaId}</if>
<if test="manager != null "> and si.manager = #{manager}</if>
<if test="contactTel != null and contactTel != ''"> and si.contact_tel = #{contactTel}</if>
<if test="warehouseId != null "> and si.warehouse_id = #{warehouseId}</if>
<if test="address != null and address != ''"> and si.address = #{address}</if>
<if test="imgUrl != null and imgUrl != ''"> and si.img_url = #{imgUrl}</if>
<if test="ifPrintNow != null "> and si.if_print_now = #{ifPrintNow}</if>
<if test="appSaleMode != null "> and si.app_sale_mode = #{appSaleMode}</if>
<if test="minDeliveryTime != null "> and si.min_delivery_time = #{minDeliveryTime}</if>
<if test="selectTimeInterval != null "> and si.select_time_interval = #{selectTimeInterval}</if>
<if test="deliveryCost != null "> and si.delivery_cost = #{deliveryCost}</if>
<if test="autoVerifyDay != null "> and si.auto_verify_day = #{autoVerifyDay}</if>
<if test="deliveryWay != null and deliveryWay != ''"> and si.delivery_way = #{deliveryWay}</if>
<if test="refundLimitTime != null "> and si.refund_limit_time = #{refundLimitTime}</if>
<if test="ifRelateDrp != null "> and si.if_relate_drp = #{ifRelateDrp}</if>
<if test="mealCode != null and mealCode != ''"> and si.meal_code = #{mealCode}</if>
<if test="ifEnablePayCode != null "> and si.if_enable_pay_code = #{ifEnablePayCode}</if>
<if test="payCodeUrl != null and payCodeUrl != ''"> and si.pay_code_url = #{payCodeUrl}</if>
</where>
</select>
<select id="selectSupermarketInfoBySupermarketId" parameterType="Long" resultMap="SupermarketInfoResult">
<include refid="selectSupermarketInfoVo"/>
where supermarket_id = #{supermarketId}
where si.supermarket_id = #{supermarketId}
</select>
<select id="getSupermarketCountByAreaIds" resultType="Integer">