master
parent
9a4b7cb8cb
commit
5fef221d30
|
@ -84,6 +84,8 @@
|
|||
<artifactId>muyu-common-core</artifactId>
|
||||
</dependency>
|
||||
|
||||
|
||||
|
||||
</dependencies>
|
||||
|
||||
<build>
|
||||
|
|
|
@ -30,6 +30,7 @@ import java.util.List;
|
|||
@RestController
|
||||
@RequestMapping("/job")
|
||||
public class SysJobController extends BaseController {
|
||||
|
||||
@Autowired
|
||||
private ISysJobService jobService;
|
||||
|
||||
|
|
|
@ -81,4 +81,9 @@ public class AttributeGroup extends BaseEntity {
|
|||
.build();
|
||||
}
|
||||
|
||||
public static AttributeGroup edUpdBuild(Long id, String states) {
|
||||
return AttributeGroup.builder()
|
||||
.id(id)
|
||||
.states(states).build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -98,4 +98,10 @@ public class RuleInfo extends BaseEntity {
|
|||
.createTime(new Date())
|
||||
.build();
|
||||
}
|
||||
|
||||
public static RuleInfo editUpdRuleStatusBuild(Long id, String status) {
|
||||
return RuleInfo.builder()
|
||||
.id(id)
|
||||
.status(status).build();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,56 @@
|
|||
package com.muyu.product.domain.resp;
|
||||
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Builder;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Data
|
||||
@Builder
|
||||
@AllArgsConstructor
|
||||
@NoArgsConstructor
|
||||
public class CategoryInfoUpdReq {
|
||||
|
||||
/** 主键 */
|
||||
|
||||
@ApiModelProperty(name = "主键", value = "主键")
|
||||
private Long id;
|
||||
|
||||
/** 品类名称 */
|
||||
|
||||
@ApiModelProperty(name = "品类名称", value = "品类名称", required = true)
|
||||
private String name;
|
||||
|
||||
/** 图片 */
|
||||
|
||||
@ApiModelProperty(name = "图片", value = "图片", required = true)
|
||||
private String image;
|
||||
|
||||
/** 是否启用 */
|
||||
|
||||
@ApiModelProperty(name = "是否启用", value = "是否启用", required = true)
|
||||
private String start;
|
||||
|
||||
/** 介绍 */
|
||||
|
||||
@ApiModelProperty(name = "介绍", value = "介绍")
|
||||
private String introduction;
|
||||
|
||||
/**
|
||||
* 商品属性组关联ID
|
||||
*/
|
||||
private List<Long> attributeInfoList;
|
||||
/**
|
||||
* 商品属性关联ID
|
||||
*/
|
||||
private List<Long> attributeGroupList;
|
||||
|
||||
/**
|
||||
* 商品品牌组关联ID
|
||||
*/
|
||||
private List<Long> brandInfoList;
|
||||
|
||||
}
|
|
@ -32,6 +32,8 @@ public class RuleInfoResp extends BaseEntity {
|
|||
/** 规格状态 */
|
||||
private String status;
|
||||
|
||||
private Boolean flan=false;
|
||||
|
||||
/**
|
||||
* 规格属性集合
|
||||
*/
|
||||
|
|
|
@ -19,5 +19,4 @@ public class MuYuProductApplication {
|
|||
public static void main (String[] args) {
|
||||
SpringApplication.run(MuYuProductApplication.class, args);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -117,4 +117,17 @@ public class AttributeGroupController extends BaseController {
|
|||
}
|
||||
|
||||
|
||||
/**
|
||||
* 修改属性状态
|
||||
*
|
||||
* @return
|
||||
*/
|
||||
@RequiresPermissions("product:attributeGroup:edit")
|
||||
@Log(title = "状态", businessType = BusinessType.UPDATE)
|
||||
@ApiOperation("修改属性状态")
|
||||
@PutMapping("/{id}/{states}")
|
||||
public Result<String> updStatus(@PathVariable Long id, @PathVariable String states) {
|
||||
return toAjax(attributeGroupService.updateById(AttributeGroup.edUpdBuild(id,states)));
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -10,6 +10,7 @@ import com.muyu.product.domain.AttributeInfo;
|
|||
import com.muyu.product.domain.BrandInfo;
|
||||
import com.muyu.product.domain.model.CategoryInfoSaveModel;
|
||||
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
||||
import com.muyu.product.domain.resp.CategoryInfoUpdReq;
|
||||
import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
||||
import io.swagger.annotations.*;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
|
@ -112,8 +113,9 @@ public class CategoryInfoController extends BaseController {
|
|||
@Log(title = "品类信息", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}")
|
||||
@ApiOperation("修改品类信息")
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoEditReq categoryInfoEditReq) {
|
||||
return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoEditReq)));
|
||||
public Result<String> edit(@PathVariable Long id, @RequestBody CategoryInfoUpdReq categoryInfoUpdReq) {
|
||||
Boolean b= categoryInfoService.updCateId(id,categoryInfoUpdReq);
|
||||
return toAjax(categoryInfoService.updateById(CategoryInfo.editBuild(id,categoryInfoUpdReq)));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -116,4 +116,15 @@ public class RuleInfoController extends BaseController {
|
|||
public Result<String> remove(@PathVariable List<Long> ids) {
|
||||
return toAjax(ruleInfoService.removeBatchByIds(ids));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商品规格状态
|
||||
*/
|
||||
@RequiresPermissions("product:rule:edit")
|
||||
@Log(title = "商品规格", businessType = BusinessType.UPDATE)
|
||||
@PutMapping("/{id}/{status}")
|
||||
@ApiOperation("修改商品规格状态")
|
||||
public Result<String> updRuleStatus(@PathVariable Long id, @PathVariable String status) {
|
||||
return toAjax(ruleInfoService.updateById(RuleInfo.editUpdRuleStatusBuild(id,status)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -2,6 +2,7 @@ package com.muyu.product.mapper;
|
|||
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
import com.muyu.product.domain.resp.AttributeGroupUpdResp;
|
||||
import org.apache.ibatis.annotations.Mapper;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.mybatis.spring.annotation.MapperScan;
|
||||
|
@ -13,4 +14,6 @@ public interface AsAttributeGroupInfoMapper{
|
|||
|
||||
|
||||
void addAttributeInfo(@Param("id") Long id, @Param("ids") Long ids);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -3,6 +3,7 @@ package com.muyu.product.mapper;
|
|||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.AsAttributeGroup;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 属性与组中间Mapper接口
|
||||
|
@ -12,4 +13,5 @@ import com.muyu.product.domain.AsAttributeGroup;
|
|||
*/
|
||||
public interface AsAttributeGroupMapper extends BaseMapper<AsAttributeGroup> {
|
||||
|
||||
void addByCategory(@Param("id") Long id, @Param("attributeGroupId") Long attributeGroupId);
|
||||
}
|
||||
|
|
|
@ -12,4 +12,5 @@ import com.muyu.product.domain.AsCategoryAttributeGroup;
|
|||
*/
|
||||
public interface AsCategoryAttributeGroupMapper extends BaseMapper<AsCategoryAttributeGroup> {
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -12,4 +12,6 @@ import com.muyu.product.domain.AsCategoryAttribute;
|
|||
*/
|
||||
public interface AsCategoryAttributeMapper extends BaseMapper<AsCategoryAttribute> {
|
||||
|
||||
|
||||
void addByCategory(Long id, Long attributeId);
|
||||
}
|
||||
|
|
|
@ -12,4 +12,6 @@ import com.muyu.product.domain.AsCategoryBrand;
|
|||
*/
|
||||
public interface AsCategoryBrandMapper extends BaseMapper<AsCategoryBrand> {
|
||||
|
||||
|
||||
void addByCategory(Long id, Long brandId);
|
||||
}
|
||||
|
|
|
@ -3,6 +3,8 @@ package com.muyu.product.mapper;
|
|||
import java.util.List;
|
||||
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
|
||||
import com.muyu.product.domain.CategoryInfo;
|
||||
import com.muyu.product.domain.resp.CategoryInfoUpdReq;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
/**
|
||||
* 品类信息Mapper接口
|
||||
|
@ -12,4 +14,5 @@ import com.muyu.product.domain.CategoryInfo;
|
|||
*/
|
||||
public interface CategoryInfoMapper extends BaseMapper<CategoryInfo> {
|
||||
|
||||
Boolean updById(@Param("id") Long id, @Param("categoryInfoUpdReq") CategoryInfoUpdReq categoryInfoUpdReq);
|
||||
}
|
||||
|
|
|
@ -19,4 +19,6 @@ public interface AsCategoryAttributeGroupService extends IService<AsCategoryAttr
|
|||
*/
|
||||
public List<AsCategoryAttributeGroup> list(AsCategoryAttributeGroup asCategoryAttributeGroup);
|
||||
|
||||
void addByCategory(Long id, Long attributeGroupId);
|
||||
|
||||
}
|
||||
|
|
|
@ -19,4 +19,5 @@ public interface AsCategoryAttributeService extends IService<AsCategoryAttribute
|
|||
*/
|
||||
public List<AsCategoryAttribute> list(AsCategoryAttribute asCategoryAttribute);
|
||||
|
||||
void addByCategory(Long id, Long attributeId);
|
||||
}
|
||||
|
|
|
@ -19,4 +19,5 @@ public interface AsCategoryBrandService extends IService<AsCategoryBrand> {
|
|||
*/
|
||||
public List<AsCategoryBrand> list(AsCategoryBrand asCategoryBrand);
|
||||
|
||||
void addByCategory(Long id, Long brandId);
|
||||
}
|
||||
|
|
|
@ -5,7 +5,6 @@ import java.util.List;
|
|||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.product.domain.AttributeGroup;
|
||||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.product.domain.AttributeInfo;
|
||||
import com.muyu.product.domain.model.AttributeGroupSaveModel;
|
||||
import com.muyu.product.domain.req.AttributeGroupEditReq;
|
||||
import com.muyu.product.domain.resp.AttributeGroupPageResp;
|
||||
|
@ -49,4 +48,6 @@ public interface AttributeGroupService extends IService<AttributeGroup> {
|
|||
AttributeGroupUpdResp getUpdById(Long id);
|
||||
|
||||
void updAttributeGroupInfo(Long id, AttributeGroupEditReq attributeGroupEditReq);
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,6 +9,7 @@ import com.muyu.product.domain.CategoryInfo;
|
|||
import com.baomidou.mybatisplus.extension.service.IService;
|
||||
import com.muyu.product.domain.model.CategoryInfoSaveModel;
|
||||
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
||||
import com.muyu.product.domain.resp.CategoryInfoUpdReq;
|
||||
import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
||||
|
||||
/**
|
||||
|
@ -69,4 +70,6 @@ public interface CategoryInfoService extends IService<CategoryInfo> {
|
|||
CategoryCommonElementResp getTemplateAttributeByCateGoryId (Long cateGoryId);
|
||||
|
||||
public <T, AS> List<T> getCommon (Long categoryId, IService<AS> iService, IService<T> bsiService);
|
||||
|
||||
Boolean updCateId(Long id, CategoryInfoUpdReq categoryInfoUpdReq);
|
||||
}
|
||||
|
|
|
@ -3,7 +3,9 @@ package com.muyu.product.service.impl;
|
|||
import java.util.List;
|
||||
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.product.mapper.AsAttributeGroupMapper;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.AsCategoryAttributeGroupMapper;
|
||||
import com.muyu.product.domain.AsCategoryAttributeGroup;
|
||||
|
@ -21,6 +23,10 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
@Service
|
||||
public class AsCategoryAttributeGroupServiceImpl extends ServiceImpl<AsCategoryAttributeGroupMapper, AsCategoryAttributeGroup> implements AsCategoryAttributeGroupService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private AsAttributeGroupMapper asAttributeGroupMapper;
|
||||
|
||||
/**
|
||||
* 查询品类属性组中间列表
|
||||
*
|
||||
|
@ -46,4 +52,9 @@ public class AsCategoryAttributeGroupServiceImpl extends ServiceImpl<AsCategoryA
|
|||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addByCategory(Long id, Long attributeGroupId) {
|
||||
asAttributeGroupMapper.addByCategory(id,attributeGroupId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.AsCategoryAttributeMapper;
|
||||
import com.muyu.product.domain.AsCategoryAttribute;
|
||||
|
@ -21,6 +22,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
@Service
|
||||
public class AsCategoryAttributeServiceImpl extends ServiceImpl<AsCategoryAttributeMapper, AsCategoryAttribute> implements AsCategoryAttributeService {
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeMapper asCategoryAttributeMapper;
|
||||
|
||||
/**
|
||||
* 查询品类属性中间列表
|
||||
*
|
||||
|
@ -46,4 +50,9 @@ public class AsCategoryAttributeServiceImpl extends ServiceImpl<AsCategoryAttrib
|
|||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addByCategory(Long id, Long attributeId) {
|
||||
asCategoryAttributeMapper.addByCategory(id,attributeId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -4,6 +4,7 @@ import java.util.List;
|
|||
|
||||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import com.muyu.product.mapper.AsCategoryBrandMapper;
|
||||
import com.muyu.product.domain.AsCategoryBrand;
|
||||
|
@ -21,6 +22,9 @@ import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|||
@Service
|
||||
public class AsCategoryBrandServiceImpl extends ServiceImpl<AsCategoryBrandMapper, AsCategoryBrand> implements AsCategoryBrandService {
|
||||
|
||||
@Autowired
|
||||
private AsCategoryBrandMapper asCategoryBrandMapper;
|
||||
|
||||
/**
|
||||
* 查询品类品牌中间列表
|
||||
*
|
||||
|
@ -46,4 +50,9 @@ public class AsCategoryBrandServiceImpl extends ServiceImpl<AsCategoryBrandMappe
|
|||
|
||||
return list(queryWrapper);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void addByCategory(Long id, Long brandId) {
|
||||
asCategoryBrandMapper.addByCategory(id,brandId);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -24,8 +24,6 @@ import org.springframework.stereotype.Service;
|
|||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
import java.util.function.Function;
|
||||
import java.util.stream.Stream;
|
||||
|
||||
/**
|
||||
* 属性组Service业务层处理
|
||||
|
@ -138,4 +136,8 @@ public class AttributeGroupServiceImpl extends ServiceImpl<AttributeGroupMapper,
|
|||
asAttributeGroupInfoMapper.addAttributeInfo(id,attributeList.getId());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -11,6 +11,7 @@ import com.muyu.product.domain.model.CategoryInfoSaveModel;
|
|||
import com.muyu.product.domain.model.TemplateAttributeGroupModel;
|
||||
import com.muyu.product.domain.model.TemplateAttributeModel;
|
||||
import com.muyu.product.domain.resp.CategoryCommonElementResp;
|
||||
import com.muyu.product.domain.resp.CategoryInfoUpdReq;
|
||||
import com.muyu.product.domain.resp.CategoryParentCommonElementResp;
|
||||
import com.muyu.product.mapper.CategoryInfoMapper;
|
||||
import com.muyu.product.service.*;
|
||||
|
@ -37,6 +38,9 @@ import java.util.stream.Stream;
|
|||
public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, CategoryInfo> implements CategoryInfoService {
|
||||
|
||||
|
||||
@Autowired
|
||||
private CategoryInfoMapper categoryInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private AsCategoryAttributeService asCategoryAttributeService;
|
||||
|
||||
|
@ -270,6 +274,36 @@ public class CategoryInfoServiceImpl extends ServiceImpl<CategoryInfoMapper, Cat
|
|||
return list;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Boolean updCateId(Long id, CategoryInfoUpdReq categoryInfoUpdReq) {
|
||||
|
||||
Boolean b=categoryInfoMapper.updById(id,categoryInfoUpdReq);
|
||||
|
||||
asCategoryAttributeService.remove(new LambdaQueryWrapper<AsCategoryAttribute>().eq(AsCategoryAttribute::getCategoryId, id));
|
||||
|
||||
asCategoryBrandService.remove(new LambdaQueryWrapper<AsCategoryBrand>().eq(AsCategoryBrand::getCategoryId, id));
|
||||
|
||||
asCategoryAttributeGroupService.remove(new LambdaQueryWrapper<AsCategoryAttributeGroup>().eq(AsCategoryAttributeGroup::getCategoryId, id));
|
||||
|
||||
|
||||
if(null!=categoryInfoUpdReq.getAttributeInfoList()){
|
||||
categoryInfoUpdReq.getAttributeInfoList().stream().forEach(attributeId->{
|
||||
asCategoryAttributeService.addByCategory(id,attributeId);
|
||||
});
|
||||
}
|
||||
if(null!=categoryInfoUpdReq.getBrandInfoList()){
|
||||
categoryInfoUpdReq.getBrandInfoList().stream().forEach(brandId->{
|
||||
asCategoryBrandService.addByCategory(id,brandId);
|
||||
});
|
||||
}
|
||||
if(null!=categoryInfoUpdReq.getAttributeGroupList()){
|
||||
categoryInfoUpdReq.getAttributeGroupList().stream().forEach(attributeGroupId->{
|
||||
asCategoryAttributeGroupService.addByCategory(id,attributeGroupId);
|
||||
});
|
||||
}
|
||||
return b;
|
||||
}
|
||||
|
||||
/**
|
||||
* 通过品类ID获取父级以上的属性、属性组、品牌集合
|
||||
*
|
||||
|
|
|
@ -12,6 +12,7 @@ import com.muyu.common.core.text.Convert;
|
|||
import com.muyu.common.core.utils.ObjUtils;
|
||||
import com.muyu.common.core.web.page.TableDataInfo;
|
||||
import com.muyu.common.security.utils.SecurityUtils;
|
||||
import com.muyu.product.domain.ProjectInfo;
|
||||
import com.muyu.product.domain.RuleAttrInfo;
|
||||
import com.muyu.product.domain.model.RuleAttrAddModel;
|
||||
import com.muyu.product.domain.model.RuleInfoAddModel;
|
||||
|
@ -19,7 +20,9 @@ import com.muyu.product.domain.req.RuleInfoQueryReq;
|
|||
import com.muyu.product.domain.resp.RuleInfoResp;
|
||||
import com.muyu.product.domain.resp.RuleInfoUpdResp;
|
||||
import com.muyu.product.mapper.RuleInfoUpdMapper;
|
||||
import com.muyu.product.service.ProjectInfoService;
|
||||
import com.muyu.product.service.RuleAttrInfoService;
|
||||
import io.jsonwebtoken.lang.Collections;
|
||||
import lombok.extern.slf4j.Slf4j;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
@ -45,6 +48,9 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
@Autowired
|
||||
private RuleInfoUpdMapper ruleInfoUpdMapper;
|
||||
|
||||
@Autowired
|
||||
private ProjectInfoService projectInfoService;
|
||||
|
||||
/**
|
||||
* 查询商品规格列表
|
||||
*
|
||||
|
@ -107,6 +113,17 @@ public class RuleInfoServiceImpl extends ServiceImpl<RuleInfoMapper, RuleInfo>
|
|||
.toList();
|
||||
boolean isPage = ruleInfoQueryReq.getParams().get("isPage") == null || Convert.toBool(ruleInfoQueryReq.getParams().get("isPage"), true);
|
||||
|
||||
ruleInfoRespList.forEach(ruleInfoResp -> {
|
||||
LambdaQueryWrapper<ProjectInfo> lambdaQueryWrapper = new LambdaQueryWrapper<>();
|
||||
lambdaQueryWrapper.eq(ProjectInfo::getRuleId,ruleInfoResp.getId());
|
||||
List<ProjectInfo> list1 = projectInfoService.list(lambdaQueryWrapper);
|
||||
if(!Collections.isEmpty(list1)){
|
||||
ruleInfoResp.setFlan(true);
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
return TableDataInfo.<RuleInfoResp>builder()
|
||||
.rows(ruleInfoRespList)
|
||||
.total(isPage ? new PageInfo<>(list).getTotal() : 0)
|
||||
|
|
|
@ -7,6 +7,7 @@
|
|||
insert into as_attribute_group (group_id,attribute_id) values (#{id},#{ids})
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="delAttributeInfo">
|
||||
delete from as_attribute_group where group_id=#{id}
|
||||
</delete>
|
||||
|
|
|
@ -18,4 +18,7 @@
|
|||
<sql id="selectAsAttributeGroupVo">
|
||||
select id, group_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_attribute_group
|
||||
</sql>
|
||||
<insert id="addByCategory">
|
||||
insert into as_category_attribute_group (category_id,attribute_group_id) values (#{id},#{attributeGroupId})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
@ -18,4 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectAsCategoryAttributeVo">
|
||||
select id, category_id, attribute_id, remark, create_by, create_time, update_by, update_time from as_category_attribute
|
||||
</sql>
|
||||
<insert id="addByCategory">
|
||||
insert into as_category_attribute_group (category_id,attribute_id) values (#{id},#{attributeId})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
@ -18,4 +18,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectAsCategoryBrandVo">
|
||||
select id, category_id, brand_id, remark, create_by, create_time, update_by, update_time from as_category_brand
|
||||
</sql>
|
||||
<insert id="addByCategory">
|
||||
insert into as_category_attribute_group (category_id,brand_id) values (#{id},#{brandId})
|
||||
</insert>
|
||||
</mapper>
|
||||
|
|
|
@ -21,4 +21,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
<sql id="selectCategoryInfoVo">
|
||||
select id, name, image, parent_id, start, introduction, remark, create_by, create_time, update_by, update_time from category_info
|
||||
</sql>
|
||||
<update id="updById">
|
||||
UPDATE category_info SET `name` = #{categoryInfoUpdReq.name},`start` =#{categoryInfoUpdReq.start}, `introduction` = #{categoryInfoUpdReq.introduction} WHERE `id` = #{id};
|
||||
</update>
|
||||
</mapper>
|
||||
|
|
|
@ -0,0 +1,14 @@
|
|||
<?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.muyu.product.mapper.RuleInfoUpdMapper">
|
||||
<insert id="addRuleInfo">
|
||||
insert into rule_attr_info (rule_id,name,attr_value,create_by,create_time,update_by,update_time) values (#{ruleId},#{name},#{join},"admin",now(),"admin",now())
|
||||
</insert>
|
||||
|
||||
|
||||
<delete id="delRuleInfo">
|
||||
delete from rule_attr_info where rule_id=#{id}
|
||||
</delete>
|
||||
</mapper>
|
Loading…
Reference in New Issue