Commit a9a2203b by XiaHou

权星登录注册

parent 9f280528
...@@ -80,7 +80,7 @@ public class PmsProductAttributeTypeController { ...@@ -80,7 +80,7 @@ public class PmsProductAttributeTypeController {
return CommonResult.success(pmsProductAttributeType); return CommonResult.success(pmsProductAttributeType);
} }
@ApiOperation("根据分类id 获取类型属性以及规格") @ApiOperation("权星后台根据分类id 获取类型属性以及规格")
@RequestMapping(value = "/getAttributeType", method = RequestMethod.GET) @RequestMapping(value = "/getAttributeType", method = RequestMethod.GET)
@ResponseBody @ResponseBody
public CommonResult getAttributeType(Long productAttributeTypeId ){ public CommonResult getAttributeType(Long productAttributeTypeId ){
......
...@@ -44,18 +44,6 @@ public class PmsProductController { ...@@ -44,18 +44,6 @@ public class PmsProductController {
return CommonResult.failed(res.getMsg()); return CommonResult.failed(res.getMsg());
} }
@ApiOperation("创建商品")
@RequestMapping(value = "/create", method = RequestMethod.POST)
@ResponseBody
//@PreAuthorize("hasAuthority('pms:product:create')")
public CommonResult create(@RequestBody PmsProductParam productParam, BindingResult bindingResult) {
int count = productService.create(productParam);
if (count > 0) {
return CommonResult.success(count);
} else {
return CommonResult.failed();
}
}
@ApiOperation("根据商品id获取商品编辑信息") @ApiOperation("根据商品id获取商品编辑信息")
@RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET) @RequestMapping(value = "/updateInfo/{id}", method = RequestMethod.GET)
......
...@@ -122,7 +122,7 @@ public class PmsProduct implements Serializable { ...@@ -122,7 +122,7 @@ public class PmsProduct implements Serializable {
private String note; private String note;
@ApiModelProperty(value = "促销类型:0->使用原价;1->使用满减价格;2->秒杀") @ApiModelProperty(value = "促销类型:0->使用原价;1->使用满减价格;2->秒杀;3->拼货商品")
private Integer promotionType; private Integer promotionType;
@ApiModelProperty(value = "赠送的成长值") @ApiModelProperty(value = "赠送的成长值")
...@@ -160,9 +160,15 @@ public class PmsProduct implements Serializable { ...@@ -160,9 +160,15 @@ public class PmsProduct implements Serializable {
@ApiModelProperty(value = "删除标识0 未删除 1已删除(彻底删除)") @ApiModelProperty(value = "删除标识0 未删除 1已删除(彻底删除)")
private Integer deleteStatus; private Integer deleteStatus;
@ApiModelProperty(value = "配送方式 1快递 2自提")
private Integer deliveryType;
@ApiModelProperty(value = "百度图库签名信息") @ApiModelProperty(value = "百度图库签名信息")
private String contSign; private String contSign;
@ApiModelProperty(value = "分销佣金")
private BigDecimal commission;
@ApiModelProperty(value = "商品描述") @ApiModelProperty(value = "商品描述")
private String description; private String description;
...@@ -563,6 +569,14 @@ public class PmsProduct implements Serializable { ...@@ -563,6 +569,14 @@ public class PmsProduct implements Serializable {
this.deleteStatus = deleteStatus; this.deleteStatus = deleteStatus;
} }
public Integer getDeliveryType() {
return deliveryType;
}
public void setDeliveryType(Integer deliveryType) {
this.deliveryType = deliveryType;
}
public String getContSign() { public String getContSign() {
return contSign; return contSign;
} }
...@@ -571,6 +585,14 @@ public class PmsProduct implements Serializable { ...@@ -571,6 +585,14 @@ public class PmsProduct implements Serializable {
this.contSign = contSign; this.contSign = contSign;
} }
public BigDecimal getCommission() {
return commission;
}
public void setCommission(BigDecimal commission) {
this.commission = commission;
}
public String getDescription() { public String getDescription() {
return description; return description;
} }
...@@ -642,7 +664,9 @@ public class PmsProduct implements Serializable { ...@@ -642,7 +664,9 @@ public class PmsProduct implements Serializable {
sb.append(", updateBy=").append(updateBy); sb.append(", updateBy=").append(updateBy);
sb.append(", delFlag=").append(delFlag); sb.append(", delFlag=").append(delFlag);
sb.append(", deleteStatus=").append(deleteStatus); sb.append(", deleteStatus=").append(deleteStatus);
sb.append(", deliveryType=").append(deliveryType);
sb.append(", contSign=").append(contSign); sb.append(", contSign=").append(contSign);
sb.append(", commission=").append(commission);
sb.append(", description=").append(description); sb.append(", description=").append(description);
sb.append(", detailHtml=").append(detailHtml); sb.append(", detailHtml=").append(detailHtml);
sb.append(", serialVersionUID=").append(serialVersionUID); sb.append(", serialVersionUID=").append(serialVersionUID);
......
...@@ -3186,6 +3186,66 @@ public class PmsProductExample { ...@@ -3186,6 +3186,66 @@ public class PmsProductExample {
return (Criteria) this; return (Criteria) this;
} }
public Criteria andDeliveryTypeIsNull() {
addCriterion("delivery_type is null");
return (Criteria) this;
}
public Criteria andDeliveryTypeIsNotNull() {
addCriterion("delivery_type is not null");
return (Criteria) this;
}
public Criteria andDeliveryTypeEqualTo(Integer value) {
addCriterion("delivery_type =", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeNotEqualTo(Integer value) {
addCriterion("delivery_type <>", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeGreaterThan(Integer value) {
addCriterion("delivery_type >", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeGreaterThanOrEqualTo(Integer value) {
addCriterion("delivery_type >=", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeLessThan(Integer value) {
addCriterion("delivery_type <", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeLessThanOrEqualTo(Integer value) {
addCriterion("delivery_type <=", value, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeIn(List<Integer> values) {
addCriterion("delivery_type in", values, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeNotIn(List<Integer> values) {
addCriterion("delivery_type not in", values, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeBetween(Integer value1, Integer value2) {
addCriterion("delivery_type between", value1, value2, "deliveryType");
return (Criteria) this;
}
public Criteria andDeliveryTypeNotBetween(Integer value1, Integer value2) {
addCriterion("delivery_type not between", value1, value2, "deliveryType");
return (Criteria) this;
}
public Criteria andContSignIsNull() { public Criteria andContSignIsNull() {
addCriterion("cont_sign is null"); addCriterion("cont_sign is null");
return (Criteria) this; return (Criteria) this;
...@@ -3255,6 +3315,66 @@ public class PmsProductExample { ...@@ -3255,6 +3315,66 @@ public class PmsProductExample {
addCriterion("cont_sign not between", value1, value2, "contSign"); addCriterion("cont_sign not between", value1, value2, "contSign");
return (Criteria) this; return (Criteria) this;
} }
public Criteria andCommissionIsNull() {
addCriterion("commission is null");
return (Criteria) this;
}
public Criteria andCommissionIsNotNull() {
addCriterion("commission is not null");
return (Criteria) this;
}
public Criteria andCommissionEqualTo(BigDecimal value) {
addCriterion("commission =", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionNotEqualTo(BigDecimal value) {
addCriterion("commission <>", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionGreaterThan(BigDecimal value) {
addCriterion("commission >", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionGreaterThanOrEqualTo(BigDecimal value) {
addCriterion("commission >=", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionLessThan(BigDecimal value) {
addCriterion("commission <", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionLessThanOrEqualTo(BigDecimal value) {
addCriterion("commission <=", value, "commission");
return (Criteria) this;
}
public Criteria andCommissionIn(List<BigDecimal> values) {
addCriterion("commission in", values, "commission");
return (Criteria) this;
}
public Criteria andCommissionNotIn(List<BigDecimal> values) {
addCriterion("commission not in", values, "commission");
return (Criteria) this;
}
public Criteria andCommissionBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("commission between", value1, value2, "commission");
return (Criteria) this;
}
public Criteria andCommissionNotBetween(BigDecimal value1, BigDecimal value2) {
addCriterion("commission not between", value1, value2, "commission");
return (Criteria) this;
}
} }
public static class Criteria extends GeneratedCriteria { public static class Criteria extends GeneratedCriteria {
......
...@@ -51,7 +51,9 @@ ...@@ -51,7 +51,9 @@
<result column="update_by" jdbcType="BIGINT" property="updateBy" /> <result column="update_by" jdbcType="BIGINT" property="updateBy" />
<result column="del_flag" jdbcType="INTEGER" property="delFlag" /> <result column="del_flag" jdbcType="INTEGER" property="delFlag" />
<result column="delete_status" jdbcType="INTEGER" property="deleteStatus" /> <result column="delete_status" jdbcType="INTEGER" property="deleteStatus" />
<result column="delivery_type" jdbcType="INTEGER" property="deliveryType" />
<result column="cont_sign" jdbcType="VARCHAR" property="contSign" /> <result column="cont_sign" jdbcType="VARCHAR" property="contSign" />
<result column="commission" jdbcType="DECIMAL" property="commission" />
</resultMap> </resultMap>
<resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.macro.mall.model.PmsProduct"> <resultMap extends="BaseResultMap" id="ResultMapWithBLOBs" type="com.macro.mall.model.PmsProduct">
<result column="description" jdbcType="LONGVARCHAR" property="description" /> <result column="description" jdbcType="LONGVARCHAR" property="description" />
...@@ -123,7 +125,7 @@ ...@@ -123,7 +125,7 @@
delivery_area, is_time_up, timer_date, market_date, product_origin, cost_price, bar_code, delivery_area, is_time_up, timer_date, market_date, product_origin, cost_price, bar_code,
virtual_sales, product_pic, pic_type, product_video, note, promotion_type, gift_growth, virtual_sales, product_pic, pic_type, product_video, note, promotion_type, gift_growth,
gift_point, use_point_limit, spu_id, third_flag, create_date, create_by, update_date, gift_point, use_point_limit, spu_id, third_flag, create_date, create_by, update_date,
update_by, del_flag, delete_status, cont_sign update_by, del_flag, delete_status, delivery_type, cont_sign, commission
</sql> </sql>
<sql id="Blob_Column_List"> <sql id="Blob_Column_List">
description, detail_html description, detail_html
...@@ -196,8 +198,9 @@ ...@@ -196,8 +198,9 @@
gift_growth, gift_point, use_point_limit, gift_growth, gift_point, use_point_limit,
spu_id, third_flag, create_date, spu_id, third_flag, create_date,
create_by, update_date, update_by, create_by, update_date, update_by,
del_flag, delete_status, cont_sign, del_flag, delete_status, delivery_type,
description, detail_html) cont_sign, commission, description,
detail_html)
values (#{name,jdbcType=VARCHAR}, #{mchtId,jdbcType=BIGINT}, #{publishStatus,jdbcType=INTEGER}, values (#{name,jdbcType=VARCHAR}, #{mchtId,jdbcType=BIGINT}, #{publishStatus,jdbcType=INTEGER},
#{publishDate,jdbcType=TIMESTAMP}, #{verifyStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER}, #{publishDate,jdbcType=TIMESTAMP}, #{verifyStatus,jdbcType=INTEGER}, #{newStatus,jdbcType=INTEGER},
#{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT}, #{brandId,jdbcType=BIGINT}, #{brandName,jdbcType=VARCHAR}, #{productCategoryId,jdbcType=BIGINT},
...@@ -214,8 +217,9 @@ ...@@ -214,8 +217,9 @@
#{giftGrowth,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER}, #{giftGrowth,jdbcType=INTEGER}, #{giftPoint,jdbcType=INTEGER}, #{usePointLimit,jdbcType=INTEGER},
#{spuId,jdbcType=VARCHAR}, #{thirdFlag,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP}, #{spuId,jdbcType=VARCHAR}, #{thirdFlag,jdbcType=INTEGER}, #{createDate,jdbcType=TIMESTAMP},
#{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT}, #{createBy,jdbcType=BIGINT}, #{updateDate,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=BIGINT},
#{delFlag,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{contSign,jdbcType=VARCHAR}, #{delFlag,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER}, #{deliveryType,jdbcType=INTEGER},
#{description,jdbcType=LONGVARCHAR}, #{detailHtml,jdbcType=LONGVARCHAR}) #{contSign,jdbcType=VARCHAR}, #{commission,jdbcType=DECIMAL}, #{description,jdbcType=LONGVARCHAR},
#{detailHtml,jdbcType=LONGVARCHAR})
</insert> </insert>
<insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct"> <insert id="insertSelective" parameterType="com.macro.mall.model.PmsProduct">
<selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long"> <selectKey keyProperty="id" order="AFTER" resultType="java.lang.Long">
...@@ -367,9 +371,15 @@ ...@@ -367,9 +371,15 @@
<if test="deleteStatus != null"> <if test="deleteStatus != null">
delete_status, delete_status,
</if> </if>
<if test="deliveryType != null">
delivery_type,
</if>
<if test="contSign != null"> <if test="contSign != null">
cont_sign, cont_sign,
</if> </if>
<if test="commission != null">
commission,
</if>
<if test="description != null"> <if test="description != null">
description, description,
</if> </if>
...@@ -522,9 +532,15 @@ ...@@ -522,9 +532,15 @@
<if test="deleteStatus != null"> <if test="deleteStatus != null">
#{deleteStatus,jdbcType=INTEGER}, #{deleteStatus,jdbcType=INTEGER},
</if> </if>
<if test="deliveryType != null">
#{deliveryType,jdbcType=INTEGER},
</if>
<if test="contSign != null"> <if test="contSign != null">
#{contSign,jdbcType=VARCHAR}, #{contSign,jdbcType=VARCHAR},
</if> </if>
<if test="commission != null">
#{commission,jdbcType=DECIMAL},
</if>
<if test="description != null"> <if test="description != null">
#{description,jdbcType=LONGVARCHAR}, #{description,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -689,9 +705,15 @@ ...@@ -689,9 +705,15 @@
<if test="record.deleteStatus != null"> <if test="record.deleteStatus != null">
delete_status = #{record.deleteStatus,jdbcType=INTEGER}, delete_status = #{record.deleteStatus,jdbcType=INTEGER},
</if> </if>
<if test="record.deliveryType != null">
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
</if>
<if test="record.contSign != null"> <if test="record.contSign != null">
cont_sign = #{record.contSign,jdbcType=VARCHAR}, cont_sign = #{record.contSign,jdbcType=VARCHAR},
</if> </if>
<if test="record.commission != null">
commission = #{record.commission,jdbcType=DECIMAL},
</if>
<if test="record.description != null"> <if test="record.description != null">
description = #{record.description,jdbcType=LONGVARCHAR}, description = #{record.description,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -754,7 +776,9 @@ ...@@ -754,7 +776,9 @@
update_by = #{record.updateBy,jdbcType=BIGINT}, update_by = #{record.updateBy,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=INTEGER}, del_flag = #{record.delFlag,jdbcType=INTEGER},
delete_status = #{record.deleteStatus,jdbcType=INTEGER}, delete_status = #{record.deleteStatus,jdbcType=INTEGER},
delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR}, cont_sign = #{record.contSign,jdbcType=VARCHAR},
commission = #{record.commission,jdbcType=DECIMAL},
description = #{record.description,jdbcType=LONGVARCHAR}, description = #{record.description,jdbcType=LONGVARCHAR},
detail_html = #{record.detailHtml,jdbcType=LONGVARCHAR} detail_html = #{record.detailHtml,jdbcType=LONGVARCHAR}
<if test="_parameter != null"> <if test="_parameter != null">
...@@ -812,7 +836,9 @@ ...@@ -812,7 +836,9 @@
update_by = #{record.updateBy,jdbcType=BIGINT}, update_by = #{record.updateBy,jdbcType=BIGINT},
del_flag = #{record.delFlag,jdbcType=INTEGER}, del_flag = #{record.delFlag,jdbcType=INTEGER},
delete_status = #{record.deleteStatus,jdbcType=INTEGER}, delete_status = #{record.deleteStatus,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR} delivery_type = #{record.deliveryType,jdbcType=INTEGER},
cont_sign = #{record.contSign,jdbcType=VARCHAR},
commission = #{record.commission,jdbcType=DECIMAL}
<if test="_parameter != null"> <if test="_parameter != null">
<include refid="Update_By_Example_Where_Clause" /> <include refid="Update_By_Example_Where_Clause" />
</if> </if>
...@@ -964,9 +990,15 @@ ...@@ -964,9 +990,15 @@
<if test="deleteStatus != null"> <if test="deleteStatus != null">
delete_status = #{deleteStatus,jdbcType=INTEGER}, delete_status = #{deleteStatus,jdbcType=INTEGER},
</if> </if>
<if test="deliveryType != null">
delivery_type = #{deliveryType,jdbcType=INTEGER},
</if>
<if test="contSign != null"> <if test="contSign != null">
cont_sign = #{contSign,jdbcType=VARCHAR}, cont_sign = #{contSign,jdbcType=VARCHAR},
</if> </if>
<if test="commission != null">
commission = #{commission,jdbcType=DECIMAL},
</if>
<if test="description != null"> <if test="description != null">
description = #{description,jdbcType=LONGVARCHAR}, description = #{description,jdbcType=LONGVARCHAR},
</if> </if>
...@@ -1026,7 +1058,9 @@ ...@@ -1026,7 +1058,9 @@
update_by = #{updateBy,jdbcType=BIGINT}, update_by = #{updateBy,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=INTEGER}, del_flag = #{delFlag,jdbcType=INTEGER},
delete_status = #{deleteStatus,jdbcType=INTEGER}, delete_status = #{deleteStatus,jdbcType=INTEGER},
delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR}, cont_sign = #{contSign,jdbcType=VARCHAR},
commission = #{commission,jdbcType=DECIMAL},
description = #{description,jdbcType=LONGVARCHAR}, description = #{description,jdbcType=LONGVARCHAR},
detail_html = #{detailHtml,jdbcType=LONGVARCHAR} detail_html = #{detailHtml,jdbcType=LONGVARCHAR}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
...@@ -1081,7 +1115,9 @@ ...@@ -1081,7 +1115,9 @@
update_by = #{updateBy,jdbcType=BIGINT}, update_by = #{updateBy,jdbcType=BIGINT},
del_flag = #{delFlag,jdbcType=INTEGER}, del_flag = #{delFlag,jdbcType=INTEGER},
delete_status = #{deleteStatus,jdbcType=INTEGER}, delete_status = #{deleteStatus,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR} delivery_type = #{deliveryType,jdbcType=INTEGER},
cont_sign = #{contSign,jdbcType=VARCHAR},
commission = #{commission,jdbcType=DECIMAL}
where id = #{id,jdbcType=BIGINT} where id = #{id,jdbcType=BIGINT}
</update> </update>
</mapper> </mapper>
\ No newline at end of file
package com.macro.mall.dao.quanxing;
import com.macro.mall.model.PmsSupplierAuditProduct;
import java.util.List;
public interface PmsSupplierAuditProductDao {
List<PmsSupplierAuditProduct> selectListByAuditId(Long auditId);
}
...@@ -81,12 +81,6 @@ public interface PmsProductService { ...@@ -81,12 +81,6 @@ public interface PmsProductService {
List<Long> getLikeId(String url); List<Long> getLikeId(String url);
/** /**
* 创建商品
*/
@Transactional(isolation = Isolation.DEFAULT,propagation = Propagation.REQUIRED)
int create(PmsProductParam productParam);
/**
* 根据商品编号获取更新信息 * 根据商品编号获取更新信息
*/ */
PmsProductResult getUpdateInfo(Long id); PmsProductResult getUpdateInfo(Long id);
......
...@@ -366,58 +366,6 @@ public class PmsProductServiceImpl implements PmsProductService { ...@@ -366,58 +366,6 @@ public class PmsProductServiceImpl implements PmsProductService {
return ids; return ids;
} }
@Override
public int create(PmsProductParam productParam) {
//创建商品
PmsProduct product = productParam;
product.setId(null);
if(StringUtils.isEmpty(product.getKeywords())){
product.setKeywords(product.getName());
}else{
product.setKeywords(product.getKeywords()+"|"+product.getName());
}
if(product.getPublishStatus() == 1){
product.setPublishDate(new Date());
}
if(StringUtils.isNotEmpty(product.getProductPic())){
product.setPicType(1);
}else if(StringUtils.isNotEmpty(product.getProductVideo())){
product.setPicType(2);
}
productMapper.insertSelective(product);
//根据促销类型设置价格:、阶梯价格、满减价格
Long productId = product.getId();
//处理sku的编码
handleSkuStockCode(productParam.getSkuStockList(),productId,productParam.getPmsProductSkuValueList());
//添加sku库存信息
relateAndInsertList(skuStockDao, productParam.getSkuStockList(), productId);
//添加商品参数,添加自定义商品规格
relateAndInsertList(productAttributeValueDao, productParam.getProductAttributeValueList(), productId);
//关联商品推荐
relateAndInsertList(pmsProductRecommendDao, productParam.getPmsProductRecommendList(), productId);
//关联商品批发价格
relateAndInsertList(pmsProductWholesalePriceDao, productParam.getPmsProductWholesalePrices(), productId);
//关联自定义参数
relateAndInsertList(pmsProductCustomAttributeDao, productParam.getPmsProductCustomAttributes(), productId);
//关联标签
relateAndInsertList(pmsProductLabelRelationDao, productParam.getPmsProductLabelRelations(), productId);
//关联商品参数
pmsProductParamInfoService.initParamInfo(productId);
//关联类目历史记录
PmsProductCategoryHistory history = new PmsProductCategoryHistory();
history.setUserId(product.getMchtId());
history.setProductCategoryIdI(product.getProductCategoryIdI());
history.setProductCategoryIdIi(product.getProductCategoryId());
history.setProductCategoryIdIii(product.getProductCategoryIdIii());
history.setCreateDate(new Date());
history.setUpdateDate(new Date());
try {
pmsProductCategoryHistoryMapper.insertSelective(history);//数据库做唯一主键处理
}catch (Exception e){
}
return 1;
}
private void handleSkuStockCode(List<PmsSkuStock> skuStockList, Long productId, List<PmsProductSkuValue> pmsProductSkuValueList) { private void handleSkuStockCode(List<PmsSkuStock> skuStockList, Long productId, List<PmsProductSkuValue> pmsProductSkuValueList) {
if(skuStockList.isEmpty()) { if(skuStockList.isEmpty()) {
......
package com.macro.mall.service.quanxing.impl; package com.macro.mall.service.quanxing.impl;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.macro.mall.dao.quanxing.PmsSupplierAuditProductDao;
import com.macro.mall.mapper.PmsSupplierAuditMapper; import com.macro.mall.mapper.PmsSupplierAuditMapper;
import com.macro.mall.mapper.PmsSupplierAuditProductMapper; import com.macro.mall.mapper.PmsSupplierAuditProductMapper;
import com.macro.mall.mapper.UmsMemberMapper; import com.macro.mall.mapper.UmsMemberMapper;
import com.macro.mall.model.PmsSupplierAudit; import com.macro.mall.model.PmsSupplierAudit;
import com.macro.mall.model.PmsSupplierAuditExample; import com.macro.mall.model.PmsSupplierAuditExample;
import com.macro.mall.model.PmsSupplierAuditProductExample;
import com.macro.mall.model.UmsMember; import com.macro.mall.model.UmsMember;
import com.macro.mall.model.common.ResultMsg; import com.macro.mall.model.common.ResultMsg;
import com.macro.mall.model.dto.PmsSupplierAuditDto; import com.macro.mall.model.dto.PmsSupplierAuditDto;
...@@ -36,6 +36,8 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService { ...@@ -36,6 +36,8 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService {
private PasswordEncoder passwordEncoder;//密码相关处理 private PasswordEncoder passwordEncoder;//密码相关处理
@Autowired @Autowired
private UmsMemberService umsMemberService;//会员表业务层 private UmsMemberService umsMemberService;//会员表业务层
@Resource
private PmsSupplierAuditProductDao pmsSupplierAuditProductDao;
/** /**
* 审核供应商 * 审核供应商
...@@ -170,14 +172,12 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService { ...@@ -170,14 +172,12 @@ public class PmsSupplierAuditServiceImpl implements IPmsSupplierAuditService {
example.createCriteria().andDeleteStatusEqualTo(0);//删除标识0 未删除 1已删除 example.createCriteria().andDeleteStatusEqualTo(0);//删除标识0 未删除 1已删除
List<PmsSupplierAudit> dataList = this.pmsSupplierAuditMapper.selectByExample(example); List<PmsSupplierAudit> dataList = this.pmsSupplierAuditMapper.selectByExample(example);
List<PmsSupplierAuditDto> psadList = new ArrayList<>(); List<PmsSupplierAuditDto> psadList = new ArrayList<>();
PmsSupplierAuditProductExample example2 = new PmsSupplierAuditProductExample();
dataList.forEach(pmsSupplierAudit->{ dataList.forEach(pmsSupplierAudit->{
PmsSupplierAuditDto dto = new PmsSupplierAuditDto(); PmsSupplierAuditDto dto = new PmsSupplierAuditDto();
//讲属性赋值到另一个对象中去 //讲属性赋值到另一个对象中去
BeanUtils.copyProperties(pmsSupplierAudit,dto); BeanUtils.copyProperties(pmsSupplierAudit,dto);
//查询供应商的审核时候商品 //查询供应商的审核时候商品
example2.createCriteria().andAuditIdEqualTo(pmsSupplierAudit.getId()); dto.setPmsSupplierAuditProductList(this.pmsSupplierAuditProductDao.selectListByAuditId(pmsSupplierAudit.getId()));
dto.setPmsSupplierAuditProductList(this.pmsSupplierAuditProductMapper.selectByExample(example2));
psadList.add(dto); psadList.add(dto);
}); });
return psadList; return psadList;
......
<?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="com.macro.mall.dao.quanxing.PmsSupplierAuditProductDao">
<resultMap id="BaseResultMap" type="com.macro.mall.model.PmsSupplierAuditProduct" extends="com.macro.mall.mapper.PmsSupplierAuditProductMapper.BaseResultMap">
</resultMap>
<select id="selectListByAuditId" parameterType="java.lang.Long" resultMap="BaseResultMap">
select * from pms_supplier_audit_product
where audit_id = #{auditId}
</select>
</mapper>
\ No newline at end of file
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