35 changed files with 953 additions and 102 deletions
@ -0,0 +1,15 @@ |
|||||
|
package cc.hiver.core.common.constant; |
||||
|
|
||||
|
/** |
||||
|
* 订单常量类 |
||||
|
* @author 王富康 |
||||
|
* @date 2023/10/21 |
||||
|
*/ |
||||
|
public interface LogiticsCompanyConstant { |
||||
|
/** |
||||
|
1:物流 |
||||
|
2:快递 |
||||
|
3:送车 |
||||
|
*/ |
||||
|
String[] SIGN_COMPANY = {"0", "1", "2", "3"}; |
||||
|
} |
||||
@ -0,0 +1,158 @@ |
|||||
|
package cc.hiver.mall.operatingarea.controller; |
||||
|
|
||||
|
import cc.hiver.core.common.utils.PoiUtil; |
||||
|
import cc.hiver.core.common.utils.ResultUtil; |
||||
|
import cc.hiver.core.common.vo.Result; |
||||
|
import cc.hiver.mall.operatingarea.entity.OperatingArea; |
||||
|
import cc.hiver.mall.operatingarea.pojo.OperatingAreaPageQuery; |
||||
|
import cc.hiver.mall.operatingarea.service.OperatingAreaService; |
||||
|
import cc.hiver.mall.operatingarea.vo.OperatingAreaPageVO; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import io.swagger.annotations.Api; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.apache.commons.lang3.StringUtils; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
import org.springframework.web.bind.annotation.RequestBody; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
import org.springframework.web.bind.annotation.RequestMethod; |
||||
|
import org.springframework.web.bind.annotation.RestController; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 运营区域 控制层 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@Api(tags = "运营区域接口") |
||||
|
@RequestMapping("/hiver/app/operatingArea/") |
||||
|
@Transactional |
||||
|
public class OperatingAreaController { |
||||
|
|
||||
|
@Autowired |
||||
|
private OperatingAreaService operatingAreaService; |
||||
|
|
||||
|
/** |
||||
|
* 新增或者修改运营区域信息 |
||||
|
* |
||||
|
* @param operatingArea 实体对象 |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/17 |
||||
|
*/ |
||||
|
@RequestMapping(value = "/saveOrUpdateOperatingArea", method = RequestMethod.POST) |
||||
|
@ApiOperation("新增或者修改运营区域信息") |
||||
|
public Result saveOrUpdateOperatingArea(OperatingArea operatingArea) { |
||||
|
final boolean b = operatingAreaService.saveOrUpdate(operatingArea); |
||||
|
if (b) { |
||||
|
return ResultUtil.success("保存成功!"); |
||||
|
} else { |
||||
|
return ResultUtil.error("保存失败!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据id查询运营区域信息 |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/18 |
||||
|
* @param id |
||||
|
* @return Result |
||||
|
*/ |
||||
|
@RequestMapping(value = "/getOperatingAreaById", method = RequestMethod.POST) |
||||
|
@ApiOperation("根据id查询运营区域信息") |
||||
|
public Result getOperatingAreaById(String id) { |
||||
|
if (StringUtils.isEmpty(id)) { |
||||
|
return ResultUtil.error("主键id不能为空!"); |
||||
|
} |
||||
|
OperatingArea operatingArea = operatingAreaService.getById(id); |
||||
|
if (operatingArea != null) { |
||||
|
return ResultUtil.data(operatingArea); |
||||
|
} else { |
||||
|
return ResultUtil.error("查询失败!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 删除 |
||||
|
* |
||||
|
* @param id 主键id |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/17 |
||||
|
*/ |
||||
|
@RequestMapping(value = "/deleteOperatingArea", method = RequestMethod.POST) |
||||
|
@ApiOperation("根据id删除运营区域信息") |
||||
|
public Result deleteOperatingArea(String id) { |
||||
|
final boolean b = operatingAreaService.deleteOperatingArea(id); |
||||
|
if (b) { |
||||
|
return ResultUtil.success("删除成功!"); |
||||
|
} else { |
||||
|
return ResultUtil.error("删除失败!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 导入excel |
||||
|
* |
||||
|
* @param file excel文件 |
||||
|
* @param shippingType 类型:0:物流名称;1:快递名称;2:送车 |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/17 |
||||
|
*/ |
||||
|
@RequestMapping(value = "/importExcel", method = RequestMethod.POST) |
||||
|
@ApiOperation("excel导入") |
||||
|
public Result importExcel(MultipartFile file, String shippingType) { |
||||
|
final List<OperatingArea> operatingAreas = PoiUtil.importExcel(file, 1, 1, OperatingArea.class); |
||||
|
final boolean b = operatingAreaService.saveBatch(operatingAreas); |
||||
|
if (b) { |
||||
|
return ResultUtil.success("导入成功!"); |
||||
|
} else { |
||||
|
return ResultUtil.error("导入失败!"); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 根据省市县获取物流/快递/送车信息 |
||||
|
* |
||||
|
* @param province 省 |
||||
|
* @param city 市 |
||||
|
* @param area 县 |
||||
|
* @param shippingType 类型 |
||||
|
* @return Result |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/17 |
||||
|
*/ |
||||
|
@RequestMapping(value = "/getByArea", method = RequestMethod.POST) |
||||
|
@ApiOperation("根据省市县获取物流/快递/送车信息") |
||||
|
public Result getByArea(String province, String city, String area, String shippingType) { |
||||
|
if (StringUtils.isEmpty(province) || StringUtils.isEmpty(city) || StringUtils.isEmpty(area)) { |
||||
|
return ResultUtil.error("省市县不能为空!"); |
||||
|
} |
||||
|
if (StringUtils.isEmpty(shippingType)) { |
||||
|
return ResultUtil.error("类型不能为空!"); |
||||
|
} |
||||
|
final List<OperatingArea> operatingAreas = operatingAreaService.getByArea(province, city, area, shippingType); |
||||
|
return ResultUtil.data(operatingAreas); |
||||
|
} |
||||
|
|
||||
|
/** |
||||
|
* 运营区域列表(分页) |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/18 |
||||
|
* @param operatingAreaPageQuery |
||||
|
* @return Result<IPage<OperatingArea>> |
||||
|
*/ |
||||
|
@RequestMapping(value = "/getOperatingAreaList", method = RequestMethod.POST) |
||||
|
@ApiOperation(value = "分页获取运营区域列表") |
||||
|
public Result<IPage<OperatingAreaPageVO>> getOperatingAreaList(@RequestBody(required = false) OperatingAreaPageQuery operatingAreaPageQuery) { |
||||
|
final IPage<OperatingAreaPageVO> result = operatingAreaService.getOperatingAreaList(operatingAreaPageQuery); |
||||
|
return new ResultUtil<IPage<OperatingAreaPageVO>>().setData(result); |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,4 @@ |
|||||
|
package cc.hiver.mall.operatingarea.dao; |
||||
|
|
||||
|
public class OperatingAreaDao { |
||||
|
} |
||||
@ -0,0 +1,51 @@ |
|||||
|
package cc.hiver.mall.operatingarea.entity; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBaseEntity; |
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import cn.afterturn.easypoi.excel.annotation.ExcelTarget; |
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 运营区域实体类 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/16 |
||||
|
*/ |
||||
|
@Data |
||||
|
@ApiModel(value = "运营区域表") |
||||
|
@TableName(value = "t_operating_area", autoResultMap = true) |
||||
|
@ExcelTarget("OperatingArea") |
||||
|
public class OperatingArea extends HiverBaseEntity { |
||||
|
|
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@Excel(name="类型",needMerge = true) |
||||
|
@ApiModelProperty(value = "类型:0:物流名称;1:快递名称;2:送车") |
||||
|
private String shippingType; |
||||
|
|
||||
|
@Excel(name="名称",needMerge = true) |
||||
|
@ApiModelProperty(value = "物流名称/快递名称/车牌号") |
||||
|
private String shippingMethod; |
||||
|
|
||||
|
@ApiModelProperty(value = "物流公司id/快递公司id/车牌号id") |
||||
|
private String shippingMethodId; |
||||
|
|
||||
|
@Excel(name="省") |
||||
|
@ApiModelProperty(value = "省") |
||||
|
private String province; |
||||
|
|
||||
|
@Excel(name="市") |
||||
|
@ApiModelProperty(value = "市") |
||||
|
private String city; |
||||
|
|
||||
|
@Excel(name="县") |
||||
|
@ApiModelProperty(value = "县") |
||||
|
private String area; |
||||
|
|
||||
|
@Excel(name="收费标准") |
||||
|
@ApiModelProperty(value = "收费标准") |
||||
|
private String chargingStandard; |
||||
|
} |
||||
@ -0,0 +1,19 @@ |
|||||
|
package cc.hiver.mall.operatingarea.mapper; |
||||
|
|
||||
|
import cc.hiver.mall.operatingarea.entity.OperatingArea; |
||||
|
import cc.hiver.mall.operatingarea.pojo.OperatingAreaPageQuery; |
||||
|
import cc.hiver.mall.operatingarea.vo.OperatingAreaPageVO; |
||||
|
import com.baomidou.mybatisplus.core.mapper.BaseMapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import org.apache.ibatis.annotations.Param; |
||||
|
import org.springframework.stereotype.Repository; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
@Repository |
||||
|
public interface OperatingAreaMapper extends BaseMapper<OperatingArea> { |
||||
|
|
||||
|
List<OperatingArea> getByArea(@Param("province") String province, @Param("city") String city, @Param("area") String area, @Param("shippingType") String shippingType); |
||||
|
|
||||
|
List<OperatingAreaPageVO> getOperatingAreaList(Page<OperatingAreaPageVO> page, @Param("queryParams") OperatingAreaPageQuery operatingAreaPageQuery); |
||||
|
} |
||||
@ -0,0 +1,61 @@ |
|||||
|
/* |
||||
|
Copyright [2022] [https://hiver.cc]
|
||||
|
|
||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
|
you may not use this file except in compliance with the License. |
||||
|
You may obtain a copy of the License at |
||||
|
|
||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, software |
||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
|
See the License for the specific language governing permissions and |
||||
|
limitations under the License. |
||||
|
*/ |
||||
|
package cc.hiver.mall.operatingarea.pojo; |
||||
|
|
||||
|
import cc.hiver.core.base.HiverBasePageQuery; |
||||
|
import io.swagger.annotations.ApiModel; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
/** |
||||
|
* 商品分页查询对象 |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2023/10/14 |
||||
|
*/ |
||||
|
@ApiModel("运营区域分页查询对象") |
||||
|
@Data |
||||
|
public class OperatingAreaPageQuery extends HiverBasePageQuery { |
||||
|
private static final long serialVersionUID = 1L; |
||||
|
|
||||
|
@ApiModelProperty("类型:0:物流名称;1:快递名称;2:送车") |
||||
|
private String shippingType; |
||||
|
|
||||
|
@ApiModelProperty("物流名称/快递名称/车牌号") |
||||
|
private String shippingMethod; |
||||
|
|
||||
|
@ApiModelProperty("物流公司id/快递公司id/车牌号id") |
||||
|
private String shippingMethodId; |
||||
|
|
||||
|
@ApiModelProperty("省") |
||||
|
private String province; |
||||
|
|
||||
|
@ApiModelProperty("市") |
||||
|
private String city; |
||||
|
|
||||
|
@ApiModelProperty("县") |
||||
|
private String area; |
||||
|
|
||||
|
@ApiModelProperty("收费标准") |
||||
|
private String chargingStandard; |
||||
|
|
||||
|
@ApiModelProperty("排序字段名") |
||||
|
private String sortField; |
||||
|
|
||||
|
@ApiModelProperty("排序规则(asc:升序;desc:降序)") |
||||
|
private String sort; |
||||
|
|
||||
|
} |
||||
@ -0,0 +1,23 @@ |
|||||
|
package cc.hiver.mall.operatingarea.service; |
||||
|
|
||||
|
import cc.hiver.mall.operatingarea.entity.OperatingArea; |
||||
|
import cc.hiver.mall.operatingarea.pojo.OperatingAreaPageQuery; |
||||
|
import cc.hiver.mall.operatingarea.vo.OperatingAreaPageVO; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 运营区域 接口层 |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/16 |
||||
|
*/ |
||||
|
public interface OperatingAreaService extends IService<OperatingArea> { |
||||
|
|
||||
|
boolean deleteOperatingArea(String id); |
||||
|
|
||||
|
List<OperatingArea> getByArea(String province, String city, String area,String shippingType); |
||||
|
|
||||
|
IPage<OperatingAreaPageVO> getOperatingAreaList(OperatingAreaPageQuery operatingAreaPageQuery); |
||||
|
} |
||||
@ -0,0 +1,47 @@ |
|||||
|
package cc.hiver.mall.operatingarea.service.impl; |
||||
|
|
||||
|
import cc.hiver.mall.operatingarea.entity.OperatingArea; |
||||
|
import cc.hiver.mall.operatingarea.mapper.OperatingAreaMapper; |
||||
|
import cc.hiver.mall.operatingarea.pojo.OperatingAreaPageQuery; |
||||
|
import cc.hiver.mall.operatingarea.service.OperatingAreaService; |
||||
|
import cc.hiver.mall.operatingarea.vo.OperatingAreaPageVO; |
||||
|
import com.baomidou.mybatisplus.core.metadata.IPage; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 运营区域 实现层 |
||||
|
* @author 王富康 |
||||
|
* @date 2023/12/16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@Service |
||||
|
public class OperatingAreaServiceImpl extends ServiceImpl<OperatingAreaMapper, OperatingArea> implements OperatingAreaService { |
||||
|
|
||||
|
@Autowired |
||||
|
private OperatingAreaMapper operatingAreaMapper; |
||||
|
|
||||
|
@Override |
||||
|
public boolean deleteOperatingArea(String id) { |
||||
|
final int i = operatingAreaMapper.deleteById(id); |
||||
|
return i > 0; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public List<OperatingArea> getByArea(String province, String city, String area, String shippingType) { |
||||
|
return operatingAreaMapper.getByArea(province, city, area, shippingType); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public IPage<OperatingAreaPageVO> getOperatingAreaList(OperatingAreaPageQuery operatingAreaPageQuery) { |
||||
|
final Page<OperatingAreaPageVO> page = new Page<>(operatingAreaPageQuery.getPageNum(), operatingAreaPageQuery.getPageSize()); |
||||
|
final List<OperatingAreaPageVO> list = operatingAreaMapper.getOperatingAreaList(page, operatingAreaPageQuery); |
||||
|
page.setRecords(list); |
||||
|
return page; |
||||
|
} |
||||
|
} |
||||
@ -0,0 +1,53 @@ |
|||||
|
/* |
||||
|
Copyright [2022] [https://hiver.cc]
|
||||
|
|
||||
|
Licensed under the Apache License, Version 2.0 (the "License"); |
||||
|
you may not use this file except in compliance with the License. |
||||
|
You may obtain a copy of the License at |
||||
|
|
||||
|
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
|
||||
|
Unless required by applicable law or agreed to in writing, software |
||||
|
distributed under the License is distributed on an "AS IS" BASIS, |
||||
|
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
||||
|
See the License for the specific language governing permissions and |
||||
|
limitations under the License. |
||||
|
*/ |
||||
|
package cc.hiver.mall.operatingarea.vo; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.annotation.TableName; |
||||
|
import io.swagger.annotations.ApiModelProperty; |
||||
|
import lombok.Data; |
||||
|
import lombok.experimental.Accessors; |
||||
|
|
||||
|
/** |
||||
|
* 商品分页查询对应Vo |
||||
|
* |
||||
|
* @author 王富康 |
||||
|
* @date 2023/10/14 |
||||
|
*/ |
||||
|
@Data |
||||
|
@Accessors(chain = true) |
||||
|
@TableName(autoResultMap = true) |
||||
|
public class OperatingAreaPageVO { |
||||
|
@ApiModelProperty("类型:0:物流名称;1:快递名称;2:送车") |
||||
|
private String shippingType; |
||||
|
|
||||
|
@ApiModelProperty("物流名称/快递名称/车牌号") |
||||
|
private String shippingMethod; |
||||
|
|
||||
|
@ApiModelProperty("物流公司id/快递公司id/车牌号id") |
||||
|
private String shippingMethodId; |
||||
|
|
||||
|
@ApiModelProperty("省") |
||||
|
private String province; |
||||
|
|
||||
|
@ApiModelProperty("市") |
||||
|
private String city; |
||||
|
|
||||
|
@ApiModelProperty("县") |
||||
|
private String area; |
||||
|
|
||||
|
@ApiModelProperty("收费标准") |
||||
|
private String chargingStandard; |
||||
|
} |
||||
@ -0,0 +1,204 @@ |
|||||
|
<?xml version="1.0" encoding="UTF-8"?> |
||||
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
||||
|
<mapper namespace="cc.hiver.mall.operatingarea.mapper.OperatingAreaMapper"> |
||||
|
<resultMap id="BaseResultMap" type="cc.hiver.mall.operatingarea.entity.OperatingArea"> |
||||
|
<id column="id" jdbcType="VARCHAR" property="id" /> |
||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy" /> |
||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" /> |
||||
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> |
||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy" /> |
||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" /> |
||||
|
<result column="shipping_type" jdbcType="VARCHAR" property="shippingType" /> |
||||
|
<result column="shipping_method" jdbcType="VARCHAR" property="shippingMethod" /> |
||||
|
<result column="shipping_method_id" jdbcType="VARCHAR" property="shippingMethodId" /> |
||||
|
<result column="province" jdbcType="VARCHAR" property="province" /> |
||||
|
<result column="city" jdbcType="VARCHAR" property="city" /> |
||||
|
<result column="area" jdbcType="VARCHAR" property="area" /> |
||||
|
<result column="charging_standard" jdbcType="VARCHAR" property="chargingStandard" /> |
||||
|
</resultMap> |
||||
|
|
||||
|
<sql id="Base_Column_List"> |
||||
|
id, create_by, create_time, del_flag, update_by, update_time, shipping_type, shipping_method, shipping_method_id, |
||||
|
province, city, area, charging_standard |
||||
|
</sql> |
||||
|
|
||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_operating_area |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</select> |
||||
|
|
||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.String"> |
||||
|
delete from t_operating_area |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</delete> |
||||
|
|
||||
|
<insert id="insert" parameterType="cc.hiver.mall.operatingarea.entity.OperatingArea"> |
||||
|
insert into t_operating_area |
||||
|
(id, create_by, create_time, del_flag, update_by, update_time,shipping_type, shipping_method, shipping_method_id, |
||||
|
province, city, area, charging_standard) |
||||
|
values (#{id,jdbcType=VARCHAR}, #{createBy,jdbcType=VARCHAR}, #{createTime,jdbcType=TIMESTAMP}, |
||||
|
#{delFlag,jdbcType=INTEGER}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
#{shippingType,jdbcType=VARCHAR},#{shippingMethod,jdbcType=VARCHAR}, #{shippingMethodId,jdbcType=VARCHAR}, |
||||
|
#{province,jdbcType=VARCHAR}, #{city,jdbcType=VARCHAR}, #{area,jdbcType=VARCHAR}, |
||||
|
#{chargingStandard,jdbcType=VARCHAR}) |
||||
|
</insert> |
||||
|
|
||||
|
<update id="updateByExampleSelective" parameterType="map"> |
||||
|
update t_operating_area |
||||
|
<set> |
||||
|
<if test="record.id != null"> |
||||
|
id = #{record.id,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createBy != null"> |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.createTime != null"> |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.delFlag != null"> |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="record.updateBy != null"> |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.updateTime != null"> |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="record.shippingType != null"> |
||||
|
shipping_type = #{record.shippingType,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.shippingMethod != null"> |
||||
|
shipping_method = #{record.shippingMethod,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.shippingMethodId != null"> |
||||
|
shipping_method_id = #{record.shippingMethodId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.province != null"> |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.city != null"> |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.area != null"> |
||||
|
area = #{record.area,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="record.chargingStandard != null"> |
||||
|
charging_standard = #{record.chargingStandard,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateByExample" parameterType="map"> |
||||
|
update t_operating_area |
||||
|
set id = #{record.id,jdbcType=VARCHAR}, |
||||
|
create_by = #{record.createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{record.createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{record.delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{record.updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{record.updateTime,jdbcType=TIMESTAMP}, |
||||
|
shipping_type = #{record.shippingType,jdbcType=VARCHAR}, |
||||
|
shipping_method = #{record.shippingMethod,jdbcType=VARCHAR}, |
||||
|
shipping_method_id = #{record.shippingMethodId,jdbcType=VARCHAR}, |
||||
|
province = #{record.province,jdbcType=VARCHAR}, |
||||
|
city = #{record.city,jdbcType=VARCHAR}, |
||||
|
area = #{record.area,jdbcType=VARCHAR}, |
||||
|
charging_standard = #{record.chargingStandard,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateByPrimaryKeySelective" parameterType="cc.hiver.mall.operatingarea.entity.OperatingArea"> |
||||
|
update t_operating_area |
||||
|
<set> |
||||
|
<if test="createBy != null"> |
||||
|
create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="createTime != null"> |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="delFlag != null"> |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
</if> |
||||
|
<if test="updateBy != null"> |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="updateTime != null"> |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
</if> |
||||
|
<if test="shippingType != null"> |
||||
|
shipping_type = #{shippingType,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shippingMethod != null"> |
||||
|
shipping_method = #{shippingMethod,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="shippingMethodId != null"> |
||||
|
shipping_method_id = #{shippingMethodId,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="province != null"> |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="city != null"> |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="area != null"> |
||||
|
area = #{area,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
<if test="chargingStandard != null"> |
||||
|
charging_standard = #{chargingStandard,jdbcType=VARCHAR}, |
||||
|
</if> |
||||
|
</set> |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
|
||||
|
<update id="updateByPrimaryKey" parameterType="cc.hiver.mall.operatingarea.entity.OperatingArea"> |
||||
|
update t_operating_area |
||||
|
set create_by = #{createBy,jdbcType=VARCHAR}, |
||||
|
create_time = #{createTime,jdbcType=TIMESTAMP}, |
||||
|
del_flag = #{delFlag,jdbcType=INTEGER}, |
||||
|
update_by = #{updateBy,jdbcType=VARCHAR}, |
||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP}, |
||||
|
shipping_type = #{shippingType,jdbcType=VARCHAR}, |
||||
|
shipping_method = #{shippingMethod,jdbcType=VARCHAR}, |
||||
|
shipping_method_id = #{shippingMethodId,jdbcType=VARCHAR}, |
||||
|
province = #{province,jdbcType=VARCHAR}, |
||||
|
city = #{city,jdbcType=VARCHAR}, |
||||
|
area = #{area,jdbcType=VARCHAR}, |
||||
|
charging_standard = #{chargingStandard,jdbcType=VARCHAR} |
||||
|
where id = #{id,jdbcType=VARCHAR} |
||||
|
</update> |
||||
|
|
||||
|
<select id="getByArea" parameterType="java.lang.String" resultMap="BaseResultMap"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_operating_area |
||||
|
where province = #{province,jdbcType=VARCHAR} |
||||
|
and city = #{city,jdbcType=VARCHAR} |
||||
|
and area = #{area,jdbcType=VARCHAR} |
||||
|
and shipping_type = #{shippingType,jdbcType=VARCHAR} |
||||
|
</select> |
||||
|
<!--管理商品分页列表--> |
||||
|
<select id="getOperatingAreaList" resultType="cc.hiver.mall.operatingarea.vo.OperatingAreaPageVO"> |
||||
|
select |
||||
|
<include refid="Base_Column_List" /> |
||||
|
from t_operating_area t |
||||
|
<where> |
||||
|
<!--类型:0:物流;1:快递;2:送车--> |
||||
|
<if test='queryParams.shippingType!=null and queryParams.shippingType.trim() neq ""'> |
||||
|
AND t.shipping_type = #{queryParams.shippingType} |
||||
|
</if> |
||||
|
<!--物流公司id/快递公司id/车牌号id--> |
||||
|
<if test='queryParams.shippingMethodId!=null and queryParams.shippingMethodId.trim() neq ""'> |
||||
|
AND t.shipping_method_id =#{queryParams.shippingMethodId} |
||||
|
</if> |
||||
|
<!--物流名称/快递名称/车牌号--> |
||||
|
<if test='queryParams.shippingMethod!=null and queryParams.shippingMethod.trim() neq ""'> |
||||
|
AND t.shipping_method like concat('%',#{queryParams.shippingMethod},'%') |
||||
|
</if> |
||||
|
</where> |
||||
|
ORDER BY |
||||
|
<if test='queryParams.sortField!=null and queryParams.sortField.trim() neq "" and queryParams.sortField !=null and queryParams.sort.trim() neq ""'> |
||||
|
#{queryParams.sortField} #{queryParams.sort} , |
||||
|
</if> |
||||
|
t.shipping_type,shipping_method asc |
||||
|
</select> |
||||
|
</mapper> |
||||
Loading…
Reference in new issue