收货地址

This commit is contained in:
sxu 2024-12-16 12:10:34 +08:00
parent dbd97f9585
commit 9da4995579
3 changed files with 28 additions and 8 deletions

View File

@ -96,7 +96,7 @@ public class BmCompanyAddressController extends BaseController {
* 修改企业信息
*/
@ApiOperation(value = "修改企业信息")
@PreventRepeatSubmit
//@PreventRepeatSubmit
//@RequiresPermissions("basic:address:edit")
@SysLog(title = "企业信息", businessType = OperaType.UPDATE, logType = 1,module = "仓储管理->修改企业信息")
@PostMapping("/edit")

View File

@ -32,16 +32,31 @@ public class BmCompanyAddress extends BaseEntity {
@ApiModelProperty(value = "需求所在省code")
private Long provinceCode;
/** 需求所在省名称 */
@Excel(name = "需求所在省名称")
@ApiModelProperty(value = "需求所在省名称")
private Long provinceName;
/** 需求所在市code */
@Excel(name = "需求所在市code")
@ApiModelProperty(value = "需求所在市code")
private Long cityCode;
/** 需求所在市名称 */
@Excel(name = "需求所在市名称")
@ApiModelProperty(value = "需求所在市名称")
private Long cityName;
/** 需求所在区code */
@Excel(name = "需求所在区code")
@ApiModelProperty(value = "需求所在区code")
private Long areaCode;
/** 需求所在区名称 */
@Excel(name = "需求所在区名称")
@ApiModelProperty(value = "需求所在区名称")
private Long areaName;
/** 企业名称 */
@Excel(name = "企业名称")
@ApiModelProperty(value = "企业名称")

View File

@ -15,23 +15,28 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<sql id="selectBmCompanyAddressVo">
select id, company_id, province_code, city_code, area_code, address, create_time, update_time from bm_company_address
select bca.id, bca.company_id, bca.province_code, bca.city_code, bca.area_code, bca.address, bca.create_time, bca.update_time,
b.name as area_name, b1.name as province_name, b2.name as city_name
from bm_company_address bca
LEFT JOIN base_address b ON b.code = bca.area_code
LEFT JOIN base_address b1 on bca.province_code = b1.code
LEFT JOIN base_address b2 on bca.city_code = b2.code
</sql>
<select id="selectBmCompanyAddressList" parameterType="com.bonus.material.basic.domain.BmCompanyAddress" resultMap="BmCompanyAddressResult">
<include refid="selectBmCompanyAddressVo"/>
<where>
<if test="companyId != null "> and company_id = #{companyId}</if>
<if test="provinceCode != null "> and province_code = #{provinceCode}</if>
<if test="cityCode != null "> and city_code = #{cityCode}</if>
<if test="areaCode != null "> and area_code = #{areaCode}</if>
<if test="address != null and address != ''"> and address = #{address}</if>
<if test="companyId != null "> and bca.company_id = #{companyId}</if>
<if test="provinceCode != null "> and bca.province_code = #{provinceCode}</if>
<if test="cityCode != null "> and bca.city_code = #{cityCode}</if>
<if test="areaCode != null "> and bca.area_code = #{areaCode}</if>
<if test="address != null and address != ''"> and bca.address = #{address}</if>
</where>
</select>
<select id="selectBmCompanyAddressById" parameterType="Long" resultMap="BmCompanyAddressResult">
<include refid="selectBmCompanyAddressVo"/>
where id = #{id}
where bca.id = #{id}
</select>
<insert id="insertBmCompanyAddress" parameterType="com.bonus.material.basic.domain.BmCompanyAddress" useGeneratedKeys="true" keyProperty="id">