修改物料包信息
This commit is contained in:
parent
0d0ac7a463
commit
5b108d5091
|
@ -34,5 +34,10 @@ public class VipDetails implements Serializable {
|
|||
@TableField
|
||||
private String vipName;
|
||||
|
||||
//邀请赏金
|
||||
private BigDecimal award;
|
||||
//类型(0会员 1技师)
|
||||
private Integer vipType;
|
||||
//优惠力度
|
||||
private BigDecimal rate;
|
||||
}
|
||||
|
|
|
@ -26,7 +26,7 @@ public class MaterialMassageServiceImpl extends ServiceImpl<MaterialMassageMappe
|
|||
materialMassage.setUpdateTime(new Date());
|
||||
QueryWrapper<MaterialMassage> queryWrapper = new QueryWrapper();
|
||||
queryWrapper.eq("material_id", materialMassage.getMaterialId());
|
||||
queryWrapper.eq("massageTypeId", materialMassage.getMassageTypeId());
|
||||
queryWrapper.eq("massage_type_id", materialMassage.getMassageTypeId());
|
||||
List<MaterialMassage> materialMassageList = baseMapper.selectList(queryWrapper);
|
||||
if(materialMassageList.size()>0){
|
||||
return Result.error("该物料包已被添加,请重新选择");
|
||||
|
|
|
@ -76,15 +76,15 @@ public class MaterialServiceImpl extends ServiceImpl<MaterialMapper, Material> i
|
|||
public Result insertIgnoreNull(Material material) {
|
||||
material.setCreateTime(new Date());
|
||||
material.setUpdateTime(new Date());
|
||||
// 创建服务查询封装器
|
||||
QueryWrapper<Material> materialQueryWrapper = new QueryWrapper();
|
||||
// 设置查询条件,根据物料ID查询物料按摩信息
|
||||
materialQueryWrapper.eq("goods_id", material.getGoodsId());
|
||||
// 根据查询封装器查询物料按摩信息
|
||||
Material materials = baseMapper.selectOne(materialQueryWrapper);
|
||||
if(materials!=null && !materials.getId().equals(material.getId()) ){
|
||||
return Result.error("当前商品已绑定物料包,请重新选择!");
|
||||
}
|
||||
// // 创建服务查询封装器
|
||||
// QueryWrapper<Material> materialQueryWrapper = new QueryWrapper();
|
||||
// // 设置查询条件,根据物料ID查询物料按摩信息
|
||||
// materialQueryWrapper.eq("goods_id", material.getGoodsId());
|
||||
// // 根据查询封装器查询物料按摩信息
|
||||
// Material materials = baseMapper.selectOne(materialQueryWrapper);
|
||||
// if(materials!=null && !materials.getId().equals(material.getId()) ){
|
||||
// return Result.error("当前商品已绑定物料包,请重新选择!");
|
||||
// }
|
||||
return Result.success().put("data",materialMapper.insertIgnoreNull(material));
|
||||
}
|
||||
|
||||
|
|
|
@ -155,7 +155,7 @@ INSERT INTO material
|
|||
and s.goods_id = #{material.goodsId}
|
||||
</if>
|
||||
<if test="material.materialName!=null and material.materialName !='' ">
|
||||
and m.material_name like '%'#{material.materialName}'%'
|
||||
and m.material_name like concat('%',#{material.materialName},'%')
|
||||
</if>
|
||||
<if test="material.status!=null and material.status !=''">
|
||||
and m.status = #{material.status}
|
||||
|
|
Loading…
Reference in New Issue