提交 c4148a01 作者: xiaowang

功能:获取租期信息

上级 902af792
...@@ -39,4 +39,12 @@ public class LeaseGoodsController extends BaseController { ...@@ -39,4 +39,12 @@ public class LeaseGoodsController extends BaseController {
public ResultBody addLeaseGoods(@RequestBody LeaseGoodsVO leaseGoodsVO, HttpServletRequest request) { public ResultBody addLeaseGoods(@RequestBody LeaseGoodsVO leaseGoodsVO, HttpServletRequest request) {
return leaseGoodsService.addLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId()); return leaseGoodsService.addLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
@ApiOperation(value = "获取租期信息")
@PostMapping("getLeaseTermInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
public ResultBody getLeaseTermInfo() {
return leaseGoodsService.getLeaseTermInfo();
}
} }
...@@ -3,6 +3,7 @@ package com.mmc.pms.dao.lease; ...@@ -3,6 +3,7 @@ package com.mmc.pms.dao.lease;
import com.mmc.pms.entity.lease.LeaseGoodsDO; import com.mmc.pms.entity.lease.LeaseGoodsDO;
import com.mmc.pms.entity.lease.LeasePartsListDO; import com.mmc.pms.entity.lease.LeasePartsListDO;
import com.mmc.pms.entity.lease.LeasePriceStockDO; import com.mmc.pms.entity.lease.LeasePriceStockDO;
import com.mmc.pms.entity.lease.LeaseTermInfoDO;
import com.mmc.pms.entity.mall.MallGoodsResourcesDO; import com.mmc.pms.entity.mall.MallGoodsResourcesDO;
import com.mmc.pms.entity.mall.SpecAttrDO; import com.mmc.pms.entity.mall.SpecAttrDO;
import com.mmc.pms.entity.mall.SpecAttrValueDO; import com.mmc.pms.entity.mall.SpecAttrValueDO;
...@@ -34,4 +35,6 @@ public interface LeaseGoodsDao { ...@@ -34,4 +35,6 @@ public interface LeaseGoodsDao {
void batchInsertPriceStock(List<LeasePriceStockDO> list); void batchInsertPriceStock(List<LeasePriceStockDO> list);
void batchInsertLeaseParts(List<LeasePartsListDO> list); void batchInsertLeaseParts(List<LeasePartsListDO> list);
List<LeaseTermInfoDO> getLeaseTermInfo();
} }
...@@ -10,4 +10,7 @@ import com.mmc.pms.model.lease.vo.LeaseGoodsVO; ...@@ -10,4 +10,7 @@ import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
*/ */
public interface LeaseGoodsService { public interface LeaseGoodsService {
ResultBody addLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId); ResultBody addLeaseGoods(LeaseGoodsVO leaseGoodsVO, Integer userAccountId);
ResultBody getLeaseTermInfo();
} }
...@@ -58,4 +58,9 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService { ...@@ -58,4 +58,9 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
leaseGoodsDao.batchInsertLeaseParts(list); leaseGoodsDao.batchInsertLeaseParts(list);
} }
} }
@Override
public ResultBody getLeaseTermInfo() {
return ResultBody.success(leaseGoodsDao.getLeaseTermInfo());
}
} }
...@@ -98,4 +98,8 @@ ...@@ -98,4 +98,8 @@
from lease_goods from lease_goods
where user_account_id = #{userAccountId} where user_account_id = #{userAccountId}
</select> </select>
<select id="getLeaseTermInfo" resultType="com.mmc.pms.entity.lease.LeaseTermInfoDO">
select id, lease_date
from lease_term_info
</select>
</mapper> </mapper>
\ No newline at end of file
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论