Commit 5a8d6353 authored by hezhen's avatar hezhen
parents 93458693 f818f191
......@@ -285,4 +285,8 @@ public class BranchCompanyStockService {
}
return RestResponse.suc();
}
public String getInfoById(Integer id) {
return branchCompanyStockInfoMapper.selectInfoById(id);
}
}
......@@ -40,4 +40,9 @@ public class BranchCompanyStockInfo {
private String companyPic;
/**
* 详情
*/
private String info;
}
\ No newline at end of file
......@@ -16,4 +16,6 @@ public interface BranchCompanyStockInfoMapper extends Mapper<BranchCompanyStockI
List<Integer> selectAllPrice();
int addCompamyList(@Param("list") List<BranchCompanyStockInfo> list);
String selectInfoById(Integer id);
}
\ No newline at end of file
......@@ -65,6 +65,15 @@ public class BranchCompanyStockController {
return RestResponse.suc(branchCompanyStockService.selectById(id));
}
@GetMapping("info/{id}")
public RestResponse getInfo(@PathVariable("id") Integer id) {
if (id == null) {
return RestResponse.codeAndMessage(ResCode.INVALID_REST_REQ_PARAM.getCode(),
ResCode.INVALID_REST_REQ_PARAM.getDesc());
}
return RestResponse.suc(branchCompanyStockService.getInfoById(id));
}
/**
* 添加
* @return
......
......@@ -7,6 +7,7 @@ import com.xinxincaravan.caravan.vehicle.biz.CampsiteBiz;
import com.xinxincaravan.caravan.vehicle.common.BaseController;
import com.xinxincaravan.caravan.vehicle.common.RestResponse;
import com.xinxincaravan.caravan.vehicle.constant.ResCode.ResCode;
import com.xinxincaravan.caravan.vehicle.entity.BranchCompany;
import com.xinxincaravan.caravan.vehicle.entity.Campsite;
import com.xinxincaravan.caravan.vehicle.feign.UserFeign;
import com.xinxincaravan.caravan.vehicle.feign.dto.UserDTO;
......@@ -35,7 +36,6 @@ public class CampsiteController extends BaseController<CampsiteBiz> {
@Autowired
private UserAuthConfig userAuthConfig;
@IgnoreUserToken
@RequestMapping(value ="/page",method = RequestMethod.GET)
public RestResponse<PageDataVo<Campsite>> page(@RequestParam Integer page, @RequestParam Integer limit,
@RequestParam(required = false) Integer addrProvince, @RequestParam(required = false) Integer addrCity,
......@@ -44,6 +44,14 @@ public class CampsiteController extends BaseController<CampsiteBiz> {
return RestResponse.data(baseBiz.getAll(page,limit,addrProvince, addrCity, addrTown, userDTO));
}
@IgnoreUserToken
@RequestMapping(value = "/allPage", method = RequestMethod.GET)
public RestResponse<PageDataVo<Campsite>> allPage(@RequestParam Integer page, @RequestParam Integer limit,
@RequestParam(required = false) Integer addrProvince, @RequestParam(required = false) Integer addrCity,
@RequestParam(required = false) Integer addrTown) {
return RestResponse.data(baseBiz.getAll(page,limit,addrProvince, addrCity, addrTown, null));
}
@RequestMapping(value ="",method = RequestMethod.GET)
public RestResponse<List<Campsite>> getAll() {
return RestResponse.data(baseBiz.getAll());
......
......@@ -36,6 +36,9 @@
<select id="selectAllPrice" resultType="int">
select distinct price from branch_company_stock_info order by price
</select>
<select id="selectInfoById" resultType="String">
select info from branch_company_stock_info where id = #{id}
</select>
<insert id="addCompamyList" parameterType="java.util.List">
insert into branch_company_stock_info (
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment