增加接口
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package com.cool.store.mapper;
|
||||
|
||||
import com.cool.store.entity.WarehouseInfoDO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import tk.mybatis.mapper.common.Mapper;
|
||||
|
||||
import java.util.List;
|
||||
@@ -13,5 +14,5 @@ import java.util.List;
|
||||
*/
|
||||
public interface WarehouseInfoMapper extends Mapper<WarehouseInfoDO> {
|
||||
|
||||
List<WarehouseInfoDO> getAllAndActive();
|
||||
List<WarehouseInfoDO> getAllAndActive(@Param("keyword") String keyword);
|
||||
}
|
||||
|
||||
@@ -13,5 +13,8 @@
|
||||
</resultMap>
|
||||
<select id="getAllAndActive" resultType="com.cool.store.entity.WarehouseInfoDO">
|
||||
select * from xfsg_warehouse_info where deleted = 0
|
||||
<if test="keyword != null and keyword != ''">
|
||||
and ( warehouse_name like concat('%',#{keyword},'%'))
|
||||
</if>
|
||||
</select>
|
||||
</mapper>
|
||||
@@ -0,0 +1,44 @@
|
||||
package com.cool.store.response;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
|
||||
/**
|
||||
* @Author: WangShuo
|
||||
* @Date: 2025/04/11/17:13
|
||||
* @Version 1.0
|
||||
* @注释:
|
||||
*/
|
||||
@Data
|
||||
public class PlatformBuildExtraFieldResponse {
|
||||
@ApiModelProperty("门店编码")
|
||||
private String shopCode;
|
||||
@ApiModelProperty("门店名称")
|
||||
private String shopName;
|
||||
@ApiModelProperty("加盟品牌")
|
||||
private String franchiseBrand;
|
||||
@ApiModelProperty("新管家对应组织")
|
||||
private String xgjRegionName;
|
||||
@ApiModelProperty("门店门头照片")
|
||||
private String shopDoorwayPhoto;
|
||||
@ApiModelProperty("门店内景照片")
|
||||
private String shopInteriorPhoto;
|
||||
@ApiModelProperty("营业执照照片")
|
||||
private String creditUrl;
|
||||
@ApiModelProperty("食品经营许可证")
|
||||
private String foodBusinessLicenseUrl;
|
||||
@ApiModelProperty("法人姓名")
|
||||
private String legalName;
|
||||
@ApiModelProperty("法人身份证正面")
|
||||
private String legalIdCardFront;
|
||||
@ApiModelProperty("法人身份证反面")
|
||||
private String legalIdCardBack;
|
||||
@ApiModelProperty("门店营业电话")
|
||||
private String businessMobile;
|
||||
@ApiModelProperty("门店省市区")
|
||||
private String shopProvinceCityDistrict;
|
||||
@ApiModelProperty("门店详细地址")
|
||||
private String shopAddress;
|
||||
|
||||
|
||||
}
|
||||
@@ -12,5 +12,5 @@ import java.util.List;
|
||||
*/
|
||||
public interface WarehouseInfoService {
|
||||
|
||||
List<WarehouseInfoDO> getAllAndActive();
|
||||
List<WarehouseInfoDO> getAllAndActive(String keyword);
|
||||
}
|
||||
|
||||
@@ -21,7 +21,7 @@ public class WarehouseInfoServiceImpl implements WarehouseInfoService {
|
||||
@Resource
|
||||
private WarehouseInfoMapper warehouseInfoMapper;
|
||||
@Override
|
||||
public List<WarehouseInfoDO> getAllAndActive() {
|
||||
return warehouseInfoMapper.getAllAndActive();
|
||||
public List<WarehouseInfoDO> getAllAndActive(String keyword) {
|
||||
return warehouseInfoMapper.getAllAndActive(keyword);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -89,4 +89,6 @@ public class PCPlatformBuildController {
|
||||
return ResponseResult.success(operationLogService.getAuditInfo(shopId, shopSubStageList));
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -7,6 +7,7 @@ import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RequestParam;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
@@ -28,7 +29,7 @@ public class PCWarehouseInfoController {
|
||||
|
||||
@GetMapping("/getAllAndActive")
|
||||
@ApiOperation(value = "获取正新鸡排仓库配置")
|
||||
public ResponseResult<List<WarehouseInfoDO>> getAllAndActive() {
|
||||
return ResponseResult.success(warehouseInfoService.getAllAndActive());
|
||||
public ResponseResult<List<WarehouseInfoDO>> getAllAndActive(@RequestParam("keyword")String keyword ) {
|
||||
return ResponseResult.success(warehouseInfoService.getAllAndActive(keyword));
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user