提交 4da63557 作者: xiaowang

小程序列表

上级 4cf87630
...@@ -40,7 +40,6 @@ public class LeaseGoodsController extends BaseController { ...@@ -40,7 +40,6 @@ public class LeaseGoodsController extends BaseController {
return leaseGoodsService.addLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId()); return leaseGoodsService.addLeaseGoods(leaseGoodsVO, this.getUserLoginInfoFromRedis(request).getUserAccountId());
} }
@ApiOperation(value = "获取租期信息") @ApiOperation(value = "获取租期信息")
@PostMapping("getLeaseTermInfo") @PostMapping("getLeaseTermInfo")
@ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)}) @ApiResponses({@ApiResponse(code = 200, message = "OK", response = ResultBody.class)})
...@@ -84,5 +83,4 @@ public class LeaseGoodsController extends BaseController { ...@@ -84,5 +83,4 @@ public class LeaseGoodsController extends BaseController {
@ApiParam(value = "商品id数组", required = true) @RequestBody List<Integer> list) { @ApiParam(value = "商品id数组", required = true) @RequestBody List<Integer> list) {
return leaseGoodsService.batchRemoveWareInfo(list); return leaseGoodsService.batchRemoveWareInfo(list);
} }
} }
...@@ -79,7 +79,7 @@ public class LeaseGoodsDO implements Serializable { ...@@ -79,7 +79,7 @@ public class LeaseGoodsDO implements Serializable {
/** /**
* 寄出物流 * 寄出物流
*/ */
private Integer logisticsCompany; private String logisticsCompany;
/** /**
* 配送方式 * 配送方式
*/ */
...@@ -95,6 +95,8 @@ public class LeaseGoodsDO implements Serializable { ...@@ -95,6 +95,8 @@ public class LeaseGoodsDO implements Serializable {
private Integer sort; private Integer sort;
private String districtCode;
/** /**
* 辅助字段 begin * 辅助字段 begin
*/ */
...@@ -124,6 +126,7 @@ public class LeaseGoodsDO implements Serializable { ...@@ -124,6 +126,7 @@ public class LeaseGoodsDO implements Serializable {
this.returnAddress = leaseGoodsVO.getReturnAddress(); this.returnAddress = leaseGoodsVO.getReturnAddress();
this.logisticsCompany = leaseGoodsVO.getLogisticsCompany(); this.logisticsCompany = leaseGoodsVO.getLogisticsCompany();
this.modeOfDelivery = leaseGoodsVO.getModeOfDelivery(); this.modeOfDelivery = leaseGoodsVO.getModeOfDelivery();
this.districtCode = leaseGoodsVO.getDistrictCode();
} }
public LeaseGoodsVO buildLeaseGoodsVO() { public LeaseGoodsVO buildLeaseGoodsVO() {
......
package com.mmc.pms.enums;
/**
* @author: zj
* @Date: 2023/8/14 16:52
*/
public enum UserTypeEnums {
PC(0, "后台用户"), APP(100, "小程序用户");
UserTypeEnums(Integer type, String typeName) {
this.type = type;
this.typeName = typeName;
}
public Integer getType() {
return type;
}
public String getTypeName() {
return typeName;
}
private Integer type;
private String typeName;
}
...@@ -37,6 +37,9 @@ public class LeaseGoodsQO implements Serializable { ...@@ -37,6 +37,9 @@ public class LeaseGoodsQO implements Serializable {
@ApiModelProperty(value = "用户id", hidden = true) @ApiModelProperty(value = "用户id", hidden = true)
private Integer userAccountId; private Integer userAccountId;
@ApiModelProperty(value = "发货地")
private String districtCode;
@ApiModelProperty(value = "页码", required = true) @ApiModelProperty(value = "页码", required = true)
@NotNull(message = "页码不能为空", groups = Page.class) @NotNull(message = "页码不能为空", groups = Page.class)
......
...@@ -91,7 +91,7 @@ public class LeaseGoodsVO implements Serializable { ...@@ -91,7 +91,7 @@ public class LeaseGoodsVO implements Serializable {
private Integer returnAddress; private Integer returnAddress;
@ApiModelProperty(value = "寄出物流") @ApiModelProperty(value = "寄出物流")
private Integer logisticsCompany; private String logisticsCompany;
@ApiModelProperty(value = "配送方式") @ApiModelProperty(value = "配送方式")
private Integer modeOfDelivery; private Integer modeOfDelivery;
...@@ -110,4 +110,7 @@ public class LeaseGoodsVO implements Serializable { ...@@ -110,4 +110,7 @@ public class LeaseGoodsVO implements Serializable {
@ApiModelProperty(value = "库存", hidden = true) @ApiModelProperty(value = "库存", hidden = true)
private Integer stock; private Integer stock;
@ApiModelProperty(value = "市code编码")
private String districtCode;
} }
...@@ -4,6 +4,7 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO; ...@@ -4,6 +4,7 @@ import com.mmc.pms.auth.dto.LoginSuccessDTO;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.lease.LeaseGoodsDao; import com.mmc.pms.dao.lease.LeaseGoodsDao;
import com.mmc.pms.entity.lease.*; import com.mmc.pms.entity.lease.*;
import com.mmc.pms.enums.UserTypeEnums;
import com.mmc.pms.model.lease.qo.LeaseGoodsQO; import com.mmc.pms.model.lease.qo.LeaseGoodsQO;
import com.mmc.pms.model.lease.vo.LeaseGoodsVO; import com.mmc.pms.model.lease.vo.LeaseGoodsVO;
import com.mmc.pms.model.lease.vo.LeasePartsListVO; import com.mmc.pms.model.lease.vo.LeasePartsListVO;
...@@ -119,15 +120,18 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService { ...@@ -119,15 +120,18 @@ public class LeaseGoodsServiceImpl implements LeaseGoodsService {
public ResultBody leaseGoodsList(LeaseGoodsQO param, LoginSuccessDTO loginSuccessDTO) { public ResultBody leaseGoodsList(LeaseGoodsQO param, LoginSuccessDTO loginSuccessDTO) {
if (loginSuccessDTO.getRoleInfo().getSuperAdmin().equals(1)) { if (loginSuccessDTO.getRoleInfo().getSuperAdmin().equals(1)) {
// 超级管理员获取所有商品信息 // 超级管理员获取所有商品信息
return ResultBody.success(getMallGoodsInfo(param)); return ResultBody.success(getLeaseGoodsInfo(param));
} else { } else if (!loginSuccessDTO.getRoleInfo().getSuperAdmin().equals(1)) {
// 非超级管理员获取自家的商品信息 // 非超级管理员获取自家的商品信息
param.setUserAccountId(loginSuccessDTO.getUserAccountId()); param.setUserAccountId(loginSuccessDTO.getUserAccountId());
return ResultBody.success(getMallGoodsInfo(param)); return ResultBody.success(getLeaseGoodsInfo(param));
} else if (loginSuccessDTO.getPortType().equals(UserTypeEnums.APP.getType())) {
return ResultBody.success(getLeaseGoodsInfo(param));
} }
return ResultBody.success();
} }
private PageResult getMallGoodsInfo(LeaseGoodsQO param) { private PageResult getLeaseGoodsInfo(LeaseGoodsQO param) {
int count = leaseGoodsDao.countLeaseGoods(param); int count = leaseGoodsDao.countLeaseGoods(param);
if (count == 0) { if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count); return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
......
...@@ -32,10 +32,11 @@ ...@@ -32,10 +32,11 @@
logistics_company, logistics_company,
mode_of_delivery, mode_of_delivery,
user_account_id, user_account_id,
district_code,
sort) sort)
values (#{tradeName}, #{sellingPoint}, #{level}, #{shelfStatus}, #{productTypeId}, #{brandInfoId}, values (#{tradeName}, #{sellingPoint}, #{level}, #{shelfStatus}, #{productTypeId}, #{brandInfoId},
#{deviceModeId}, #{productParam}, #{productDetails}, #{minLeaseTerm}, #{maxLeaseTerm}, #{shipAddress}, #{deviceModeId}, #{productParam}, #{productDetails}, #{minLeaseTerm}, #{maxLeaseTerm}, #{shipAddress},
#{returnAddress}, #{logisticsCompany}, #{modeOfDelivery}, #{userAccountId}, #{sort}) #{returnAddress}, #{logisticsCompany}, #{modeOfDelivery}, #{userAccountId}, #{districtCode}, #{sort})
</insert> </insert>
<insert id="batchInsertLeaseGoodsResources"> <insert id="batchInsertLeaseGoodsResources">
insert into lease_goods_resources (lease_goods_id, insert into lease_goods_resources (lease_goods_id,
...@@ -317,6 +318,9 @@ ...@@ -317,6 +318,9 @@
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and user_account_id = #{userAccountId}
</if> </if>
<if test="districtCode != null and districtCode != ''">
and district_code = #{districtCode}
</if>
</where> </where>
</select> </select>
<resultMap id="leaseGoodsMap" type="com.mmc.pms.entity.lease.LeaseGoodsDO"> <resultMap id="leaseGoodsMap" type="com.mmc.pms.entity.lease.LeaseGoodsDO">
...@@ -324,6 +328,9 @@ ...@@ -324,6 +328,9 @@
<result column="trade_name" property="tradeName"/> <result column="trade_name" property="tradeName"/>
<result column="product_type_id" property="productTypeId"/> <result column="product_type_id" property="productTypeId"/>
<result column="shelf_status" property="shelfStatus"/> <result column="shelf_status" property="shelfStatus"/>
<result column="selling_point" property="sellingPoint"/>
<result column="product_param" property="productParam"/>
<result column="user_account_id" property="userAccountId"/>
<collection property="leaseGoodsResources" javaType="java.util.List" <collection property="leaseGoodsResources" javaType="java.util.List"
ofType="com.mmc.pms.entity.lease.LeaseGoodsResourcesDO"> ofType="com.mmc.pms.entity.lease.LeaseGoodsResourcesDO">
<id column="resourceId" property="id"/> <id column="resourceId" property="id"/>
...@@ -347,6 +354,9 @@ ...@@ -347,6 +354,9 @@
lg.trade_name, lg.trade_name,
lg.product_type_id, lg.product_type_id,
lg.shelf_status, lg.shelf_status,
lg.selling_point,
lg.product_param,
lg.user_account_id,
lg.create_time, lg.create_time,
lgr.id resourceId, lgr.id resourceId,
lgr.type, lgr.type,
...@@ -364,19 +374,22 @@ ...@@ -364,19 +374,22 @@
LEFT JOIN lease_price_stock lps ON lps.lease_goods_id = lg.id LEFT JOIN lease_price_stock lps ON lps.lease_goods_id = lg.id
<where> <where>
<if test="shelfStatus != null"> <if test="shelfStatus != null">
and shelf_status = #{shelfStatus} and lg.shelf_status = #{shelfStatus}
</if> </if>
<if test="tradeName != null and tradeName != ''"> <if test="tradeName != null and tradeName != ''">
and (trade_name LIKE CONCAT('%',#{tradeName},'%')) and (lg.trade_name LIKE CONCAT('%',#{tradeName},'%'))
</if> </if>
<if test="productTypeId != null"> <if test="productTypeId != null">
and product_type_id = #{productTypeId} and lg.product_type_id = #{productTypeId}
</if> </if>
<if test="brandInfoId != null"> <if test="brandInfoId != null">
and brand_info_id = #{brandInfoId} and lg.brand_info_id = #{brandInfoId}
</if> </if>
<if test="userAccountId != null"> <if test="userAccountId != null">
and user_account_id = #{userAccountId} and lg.user_account_id = #{userAccountId}
</if>
<if test="districtCode != null and districtCode != ''">
and district_code = #{districtCode}
</if> </if>
</where> </where>
order by lg.shelf_status DESC, lg.sort DESC order by lg.shelf_status DESC, lg.sort DESC
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论