Преглед изворни кода

Merge branch 'release_toaliyun_real_20230228' of https://git.malls.iformall.com/server/formallProject into release_toaliyun_real_20230228

release_toaliyun_real
lin пре 3 година
родитељ
комит
06795d18bd
12 измењених фајлова са 460 додато и 12 уклоњено
  1. +10
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/basic/TtGoodsCategoryController.java
  2. +57
    -0
      mallinkAdmin/src/main/java/com/iformall/controller/basic/TtMallGoodsCategoryController.java
  3. +35
    -0
      mallinkService/src/main/java/com/iformall/domain/po/TtMallGoodsCategory.java
  4. +52
    -0
      mallinkService/src/main/java/com/iformall/domain/vo/TtMallGoodsCategoryVo.java
  5. +4
    -1
      mallinkService/src/main/java/com/iformall/mapper/TtGoodsCategoryMapper.java
  6. +25
    -0
      mallinkService/src/main/java/com/iformall/mapper/TtMallGoodsCategoryMapper.java
  7. +3
    -0
      mallinkService/src/main/java/com/iformall/service/TtGoodsCategoryService.java
  8. +17
    -0
      mallinkService/src/main/java/com/iformall/service/TtMallGoodsCategoryService.java
  9. +42
    -10
      mallinkService/src/main/java/com/iformall/service/impl/TtGoodsCategoryServiceImpl.java
  10. +86
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtMallGoodsCategoryServiceImpl.java
  11. +7
    -1
      mallinkService/src/main/resources/mapper/TtGoodsCategoryMapper.xml
  12. +122
    -0
      mallinkService/src/main/resources/mapper/TtMallGoodsCategoryMapper.xml

+ 10
- 0
mallinkAdmin/src/main/java/com/iformall/controller/basic/TtGoodsCategoryController.java Прегледај датотеку

@@ -63,6 +63,16 @@ public class TtGoodsCategoryController extends BaseController {
return new ResultData(); return new ResultData();
} }


@TenantIgnore
@ApiOperation("分页列表接口")
@GetMapping("allTreeList")
@ApiImplicitParams({})
@SystemControllerLog(description = "列表")
public ResultData allTreeList() {
logger.debug("[" + getIpAddr() + "] TtMerchantPoiController::allTreeList");
return new ResultData(ttGoodsCategoryService.findAllTreeList());
}

@TenantIgnore @TenantIgnore
@ApiOperation("设置抖音软件服务费率") @ApiOperation("设置抖音软件服务费率")
@PostMapping("setServiceFee") @PostMapping("setServiceFee")


+ 57
- 0
mallinkAdmin/src/main/java/com/iformall/controller/basic/TtMallGoodsCategoryController.java Прегледај датотеку

@@ -0,0 +1,57 @@
package com.iformall.controller.basic;


import com.iformall.annotation.SystemControllerLog;
import com.iformall.annotation.TenantIgnore;
import com.iformall.common.ErrorCode;
import com.iformall.common.ResultData;
import com.iformall.controller.base.BaseController;
import com.iformall.domain.po.TtGoodsCategory;
import com.iformall.domain.vo.TtMallGoodsCategoryVo;
import com.iformall.service.TtGoodsCategoryService;
import com.iformall.service.TtMallGoodsCategoryService;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;


/**
* @author gongbiao
*/
@RestController
@RequestMapping("mallGoodsCategory")
public class TtMallGoodsCategoryController extends BaseController {
private final Logger logger = LoggerFactory.getLogger(this.getClass());

@Autowired
private TtMallGoodsCategoryService ttMallGoodsCategoryService;


@ApiOperation("分页列表接口")
@GetMapping("allTreeList")
@ApiImplicitParams({})
@SystemControllerLog(description = "列表")
public ResultData allTreeList() {
logger.debug("[" + getIpAddr() + "] TtMerchantPoiController::allTreeList");
return new ResultData(ttMallGoodsCategoryService.findAllTreeList(getTenantInfo()));
}

@ApiOperation("设置软件服务费")
@PostMapping("setMallSoftwareFee")
@ApiImplicitParams({})
@SystemControllerLog(description = "修改")
public ResultData setMallSoftwareFee(@RequestBody TtMallGoodsCategoryVo record) {
logger.debug("[" + getIpAddr() + "] TtMerchantPoiController::setMallSoftwareFee");
if(record.getCategoryId() == null || record.getMallSoftwareFee() == null){
return new ResultData(ErrorCode.SYS_PARAMETER_NOT_NULL);
}
record.updateTenantInfo(getTenantInfo());

ttMallGoodsCategoryService.updateFee(record);
return new ResultData();
}

}

+ 35
- 0
mallinkService/src/main/java/com/iformall/domain/po/TtMallGoodsCategory.java Прегледај датотеку

@@ -0,0 +1,35 @@
package com.iformall.domain.po;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

@TableName(value = "tt_mall_goods_category")
@Data
@EqualsAndHashCode(callSuper = true)
public class TtMallGoodsCategory extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="",name="goodsCategoryId")
private Integer goodsCategoryId;

@io.swagger.annotations.ApiModelProperty(value="",name="softwareFee")
private Integer softwareFee;

@io.swagger.annotations.ApiModelProperty(value="创建时间",name="createDate")
private Date createDate;
@io.swagger.annotations.ApiModelProperty(value="更新时间",name="updateDate")
private Date updateDate;

@io.swagger.annotations.ApiModelProperty(value="",name="isDel")
private Integer isDel;

@TableField(exist = false)
private List<Integer> categoryIds;

}

+ 52
- 0
mallinkService/src/main/java/com/iformall/domain/vo/TtMallGoodsCategoryVo.java Прегледај датотеку

@@ -0,0 +1,52 @@
package com.iformall.domain.vo;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.iformall.domain.po.TtGoodsCategory;
import com.iformall.domain.po.base.TenantEntity;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.util.Date;
import java.util.List;

@Data
@EqualsAndHashCode(callSuper = true)
public class TtMallGoodsCategoryVo extends TenantEntity {

@io.swagger.annotations.ApiModelProperty(value="",name="categoryId")
private Integer categoryId;

@io.swagger.annotations.ApiModelProperty(value="层级",name="level")
private Integer level;

@io.swagger.annotations.ApiModelProperty(value="",name="name")
private String name;

@io.swagger.annotations.ApiModelProperty(value="",name="parentId")
private Integer parentId;

@io.swagger.annotations.ApiModelProperty(value="类目是否开放",name="enable")
private Integer enable;

@io.swagger.annotations.ApiModelProperty(value="是否是叶子结点",name="isLeaf")
private Integer isLeaf;

@io.swagger.annotations.ApiModelProperty(value="",name="serviceFee")
private Integer serviceFee;

@io.swagger.annotations.ApiModelProperty(value="",name="softwareFee")
private Integer softwareFee;

@io.swagger.annotations.ApiModelProperty(value="",name="mallSoftwareFee")
private Integer mallSoftwareFee;


@TableField(exist = false)
protected List<TtMallGoodsCategoryVo> child;


@io.swagger.annotations.ApiModelProperty(value="",name="isDel")
private Integer isDel;

}

+ 4
- 1
mallinkService/src/main/java/com/iformall/mapper/TtGoodsCategoryMapper.java Прегледај датотеку

@@ -10,9 +10,12 @@ public interface TtGoodsCategoryMapper extends CommonMapper<TtGoodsCategory, Str


List<TtGoodsCategory> findList(TtGoodsCategory record); List<TtGoodsCategory> findList(TtGoodsCategory record);


List<TtGoodsCategory> findMinList(TtGoodsCategory record);

List<Integer> findIdAll(TtGoodsCategory record); List<Integer> findIdAll(TtGoodsCategory record);


int updDelByIds(TtGoodsCategory record); int updDelByIds(TtGoodsCategory record);


int updateByFreeIds(TtGoodsCategory updgc);
int updateFeeByIds(TtGoodsCategory updgc);

} }

+ 25
- 0
mallinkService/src/main/java/com/iformall/mapper/TtMallGoodsCategoryMapper.java Прегледај датотеку

@@ -0,0 +1,25 @@
package com.iformall.mapper;

import com.iformall.common.CommonMapper;
import com.iformall.domain.po.TtGoodsCategory;
import com.iformall.domain.po.TtMallGoodsCategory;
import com.iformall.domain.vo.TtMallGoodsCategoryVo;

import java.util.List;

public interface TtMallGoodsCategoryMapper extends CommonMapper<TtMallGoodsCategory, String> {


List<TtMallGoodsCategoryVo> findAllTreeList(TtMallGoodsCategoryVo recordVo);


List<TtMallGoodsCategory> findList(TtMallGoodsCategory record);

List<Integer> findIdAll(TtMallGoodsCategory record);

int updDelByIds(TtMallGoodsCategory record);

int updateFeeByIds(TtMallGoodsCategory record);


}

+ 3
- 0
mallinkService/src/main/java/com/iformall/service/TtGoodsCategoryService.java Прегледај датотеку

@@ -19,6 +19,8 @@ public interface TtGoodsCategoryService {
*/ */
List<TtGoodsCategory> findTreeList(); List<TtGoodsCategory> findTreeList();


List<TtGoodsCategory> findAllTreeList();



/** /**
* A端是否显示处理 * A端是否显示处理
@@ -46,4 +48,5 @@ public interface TtGoodsCategoryService {
List<GoodsCategory> categoryGet(Integer categoryId); List<GoodsCategory> categoryGet(Integer categoryId);


void updateFee(TtGoodsCategory record); void updateFee(TtGoodsCategory record);

} }

+ 17
- 0
mallinkService/src/main/java/com/iformall/service/TtMallGoodsCategoryService.java Прегледај датотеку

@@ -0,0 +1,17 @@
package com.iformall.service;

import com.iformall.common.ErrorCode;
import com.iformall.domain.po.TtGoodsCategory;
import com.iformall.domain.po.TtMallGoodsCategory;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.TtMallGoodsCategoryVo;

import java.util.List;

public interface TtMallGoodsCategoryService {

List<TtMallGoodsCategoryVo> findAllTreeList(TenantEntity tenantInfo);

void updateFee(TtMallGoodsCategoryVo record);

}

+ 42
- 10
mallinkService/src/main/java/com/iformall/service/impl/TtGoodsCategoryServiceImpl.java Прегледај датотеку

@@ -13,6 +13,7 @@ import com.iformall.douyin.web.bean.GoodsCategory;
import com.iformall.douyin.web.bean.GoodsTemplateGet; import com.iformall.douyin.web.bean.GoodsTemplateGet;
import com.iformall.enums.EnumCouponValidType; import com.iformall.enums.EnumCouponValidType;
import com.iformall.enums.EnumGoodsCategoryRate; import com.iformall.enums.EnumGoodsCategoryRate;
import com.iformall.enums.EnumMerchantStatus;
import com.iformall.enums.EnumYesOrNo; import com.iformall.enums.EnumYesOrNo;
import com.iformall.exception.MallinkException; import com.iformall.exception.MallinkException;
import com.iformall.mapper.TtGoodsCategoryMapper; import com.iformall.mapper.TtGoodsCategoryMapper;
@@ -34,6 +35,7 @@ import org.springframework.stereotype.Service;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.stream.Collectors;


@Service @Service
public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService { public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService {
@@ -53,14 +55,37 @@ public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService {
public List<TtGoodsCategory> findTreeList() { public List<TtGoodsCategory> findTreeList() {
TtGoodsCategory record = new TtGoodsCategory(); TtGoodsCategory record = new TtGoodsCategory();
record.setEnable(EnumYesOrNo.YES.getCode()); record.setEnable(EnumYesOrNo.YES.getCode());
record.setIsDel(EnumYesOrNo.NO.getCode());
record.setSortColumns(BaseEntity.SortField.Id_ASC);
List<TtGoodsCategory> listAll = ttGoodsCategoryMapper.findMinList(record);
if(listAll == null || listAll.isEmpty()){
return new ArrayList<>();
}
List<TtGoodsCategory> topList = listAll.stream().filter(gc -> gc.getParentId().intValue() == 0).collect(Collectors.toList());
if(topList != null && !topList.isEmpty()){
listAll.removeAll(topList);
for (TtGoodsCategory category:topList) {
category.setChild(getChild(listAll,category.getId()));
}
}
return topList;
}

@Override
public List<TtGoodsCategory> findAllTreeList() {
TtGoodsCategory record = new TtGoodsCategory();
// record.setEnable(EnumYesOrNo.YES.getCode());
record.setIsDel(EnumYesOrNo.NO.getCode()); record.setIsDel(EnumYesOrNo.NO.getCode());
record.setSortColumns(BaseEntity.SortField.Id_ASC); record.setSortColumns(BaseEntity.SortField.Id_ASC);
List<TtGoodsCategory> listAll = ttGoodsCategoryMapper.findList(record); List<TtGoodsCategory> listAll = ttGoodsCategoryMapper.findList(record);
List<TtGoodsCategory> topList = new ArrayList<TtGoodsCategory>();
for (TtGoodsCategory category:listAll) {
if(category.getParentId().intValue() == 0){
if(listAll == null || listAll.isEmpty()){
return new ArrayList<>();
}
List<TtGoodsCategory> topList = listAll.stream().filter(gc -> gc.getParentId().intValue() == 0).collect(Collectors.toList());
if(topList != null && !topList.isEmpty()){
listAll.removeAll(topList);
for (TtGoodsCategory category:topList) {
category.setChild(getChild(listAll,category.getId())); category.setChild(getChild(listAll,category.getId()));
topList.add(category);
} }
} }
return topList; return topList;
@@ -69,11 +94,18 @@ public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService {


private List<TtGoodsCategory> getChild(List<TtGoodsCategory> listAll,Integer parentId){ private List<TtGoodsCategory> getChild(List<TtGoodsCategory> listAll,Integer parentId){
List<TtGoodsCategory> childList = new ArrayList<TtGoodsCategory>(); List<TtGoodsCategory> childList = new ArrayList<TtGoodsCategory>();

for(TtGoodsCategory entity : listAll){
if(parentId.equals(entity.getParentId())){
entity.setChild(getChild(listAll,entity.getId()));
childList.add(entity);
if(listAll == null || listAll.isEmpty()){
return childList;
}
for(TtGoodsCategory category : listAll){
if(parentId.equals(category.getParentId())){
childList.add(category);
}
}
if(!childList.isEmpty()){
listAll.removeAll(childList);
for (TtGoodsCategory category:childList) {
category.setChild(getChild(listAll,category.getId()));
} }
} }


@@ -601,7 +633,7 @@ public class TtGoodsCategoryServiceImpl implements TtGoodsCategoryService {
updgc.setServiceFee(serviceFee); updgc.setServiceFee(serviceFee);
updgc.setSoftwareFee(softwareFee); updgc.setSoftwareFee(softwareFee);
updgc.setUpdateDate(now); updgc.setUpdateDate(now);
int i = ttGoodsCategoryMapper.updateByFreeIds(updgc);
int i = ttGoodsCategoryMapper.updateFeeByIds(updgc);
if(i > 0){ if(i > 0){
TtGoodsCategory gcq = new TtGoodsCategory(); TtGoodsCategory gcq = new TtGoodsCategory();
gcq.setParentIds(ids); gcq.setParentIds(ids);


+ 86
- 0
mallinkService/src/main/java/com/iformall/service/impl/TtMallGoodsCategoryServiceImpl.java Прегледај датотеку

@@ -0,0 +1,86 @@
package com.iformall.service.impl;


import com.iformall.domain.po.TtGoodsCategory;
import com.iformall.domain.po.TtMallGoodsCategory;
import com.iformall.domain.po.base.BaseEntity;
import com.iformall.domain.po.base.TenantEntity;
import com.iformall.domain.vo.TtMallGoodsCategoryVo;
import com.iformall.enums.EnumYesOrNo;
import com.iformall.mapper.TtGoodsCategoryMapper;
import com.iformall.mapper.TtMallGoodsCategoryMapper;
import com.iformall.service.TtMallGoodsCategoryService;
import com.iformall.service.TtMerchantPoiService;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.List;
import java.util.stream.Collectors;

@Service
public class TtMallGoodsCategoryServiceImpl implements TtMallGoodsCategoryService {
private final Logger logger = LoggerFactory.getLogger(this.getClass());
@Autowired
TtMallGoodsCategoryMapper ttMallGoodsCategoryMapper;

@Autowired
@Qualifier("objectCommonRedisTemplate")
RedisTemplate<String, Object> categoryRedisTemplate;


@Override
public List<TtMallGoodsCategoryVo> findAllTreeList(TenantEntity tenantInfo) {
TtMallGoodsCategoryVo mgcVoQ = new TtMallGoodsCategoryVo();
mgcVoQ.updateTenantInfo(tenantInfo);
mgcVoQ.setIsDel(EnumYesOrNo.NO.getCode());
mgcVoQ.setSortColumns(BaseEntity.SortField.Id_ASC);
List<TtMallGoodsCategoryVo> listAll = ttMallGoodsCategoryMapper.findAllTreeList(mgcVoQ);
if(listAll == null || listAll.isEmpty()){
return new ArrayList<>();
}
List<TtMallGoodsCategoryVo> topList = listAll.stream().filter(gc -> gc.getParentId().intValue() == 0).collect(Collectors.toList());
if(topList != null && !topList.isEmpty()){
listAll.removeAll(topList);
for (TtMallGoodsCategoryVo categoryVo:topList) {
categoryVo.setChild(getChild(listAll,categoryVo.getCategoryId()));
}
}
return topList;
}

private List<TtMallGoodsCategoryVo> getChild(List<TtMallGoodsCategoryVo> listAll, Integer parentId){
List<TtMallGoodsCategoryVo> childList = new ArrayList<TtMallGoodsCategoryVo>();
if(listAll == null || listAll.isEmpty()){
return childList;
}
for(TtMallGoodsCategoryVo categoryVo : listAll){
if(parentId.equals(categoryVo.getParentId())){
childList.add(categoryVo);
}
}
if(!childList.isEmpty()){
listAll.removeAll(childList);
for (TtMallGoodsCategoryVo categoryVo:childList) {
categoryVo.setChild(getChild(listAll,categoryVo.getCategoryId()));
}
}

return childList;
}

@Override
public void updateFee(TtMallGoodsCategoryVo record) {
TtMallGoodsCategory mgcUpd = new TtMallGoodsCategory();
mgcUpd.setGoodsCategoryId(record.getCategoryId());
mgcUpd.updateTenantInfo(record);
// ttMallGoodsCategoryMapper.selectByTenantAnd();


}
}

+ 7
- 1
mallinkService/src/main/resources/mapper/TtGoodsCategoryMapper.xml Прегледај датотеку

@@ -68,6 +68,12 @@
<include refid="dynamicWhereConditions" /> <include refid="dynamicWhereConditions" />
</select> </select>


<select id="findMinList" parameterType="com.iformall.domain.po.TtGoodsCategory" resultMap="BaseResultMap">
select `id`,`level`,`name`,`parent_id`,`enable`,`is_leaf`
from tt_goods_category
<include refid="dynamicWhereConditions" />
</select>

<select id="findIdAll" parameterType="com.iformall.domain.po.TtGoodsCategory" resultType="Integer"> <select id="findIdAll" parameterType="com.iformall.domain.po.TtGoodsCategory" resultType="Integer">
select id from tt_goods_category select id from tt_goods_category
<include refid="dynamicWhereConditions" /> <include refid="dynamicWhereConditions" />
@@ -81,7 +87,7 @@
</foreach> </foreach>
</update> </update>


<update id="updateByFreeIds" parameterType="com.iformall.domain.po.TtGoodsCategory">
<update id="updateFeeByIds" parameterType="com.iformall.domain.po.TtGoodsCategory">
update tt_goods_category set update_date = #{updateDate} update tt_goods_category set update_date = #{updateDate}
<if test=" null != serviceFee ">,`service_fee` = #{serviceFee}</if> <if test=" null != serviceFee ">,`service_fee` = #{serviceFee}</if>
<if test=" null != softwareFee ">,`software_fee` = #{softwareFee}</if> <if test=" null != softwareFee ">,`software_fee` = #{softwareFee}</if>


+ 122
- 0
mallinkService/src/main/resources/mapper/TtMallGoodsCategoryMapper.xml Прегледај датотеку

@@ -0,0 +1,122 @@
<?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.iformall.mapper.TtMallGoodsCategoryMapper">
<resultMap id="BaseResultMap" type="com.iformall.domain.po.TtMallGoodsCategory">
<result column="goods_category_id" jdbcType="INTEGER" property="goodsCategoryId" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="software_fee" jdbcType="INTEGER" property="softwareFee" />
</resultMap>
<sql id="allColumns">
`goods_category_id`,`tenant_id`,`parent_tenant_id`,`software_fee`
</sql>

<sql id="dynamicWhereConditions">
where 1=1
<if test=" null != goodsCategoryId ">
and `goods_category_id` = #{goodsCategoryId}
</if>

<if test=" null != tenantId and '' != tenantId">
and `tenant_id` = #{tenantId}
</if>
<if test=" null != parentTenantId and '' != parentTenantId">
and `parent_tenant_id` = #{parentTenantId}
</if>

<if test=" null != isDel ">
and `is_del` = #{isDel}
</if>

<if test=" null != categoryIds ">
and goods_category_id in
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>
</sql>
<select id="findList" parameterType="com.iformall.domain.po.TtMallGoodsCategory" resultMap="BaseResultMap">
select <include refid="allColumns" /> from tt_mall_goods_category
<include refid="dynamicWhereConditions" />
</select>

<select id="findIdAll" parameterType="com.iformall.domain.po.TtMallGoodsCategory" resultType="Integer">
select id from tt_mall_goods_category
<include refid="dynamicWhereConditions" />
</select>

<update id="updDelByIds" parameterType="com.iformall.domain.po.TtMallGoodsCategory">
update tt_mall_goods_category set is_del = #{isDel}, update_date = #{updateDate}
where goods_category_id in
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</update>

<update id="updateFeeByIds" parameterType="com.iformall.domain.po.TtMallGoodsCategory">
update tt_mall_goods_category set `software_fee` = #{softwareFee}, update_date = #{updateDate}
where goods_category_id in
<foreach collection="categoryIds" index="index" item="idItem" open="(" separator="," close=")">
#{idItem}
</foreach>
</update>




<resultMap id="BaseResultMapVo" type="com.iformall.domain.vo.TtMallGoodsCategoryVo">
<result column="id" jdbcType="INTEGER" property="goodsCategoryId" />
<result column="level" jdbcType="INTEGER" property="level" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="parent_id" jdbcType="INTEGER" property="parentId" />
<result column="enable" jdbcType="INTEGER" property="enable" />
<result column="is_leaf" jdbcType="INTEGER" property="isLeaf" />
<result column="service_fee" jdbcType="INTEGER" property="serviceFee" />
<result column="software_fee" jdbcType="INTEGER" property="softwareFee" />
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
<result column="parent_tenant_id" jdbcType="VARCHAR" property="parentTenantId"/>
<result column="mall_software_fee" jdbcType="INTEGER" property="mallSoftwareFee" />
</resultMap>

<select id="findAllTreeList" parameterType="com.iformall.domain.vo.TtMallGoodsCategoryVo" resultMap="BaseResultMapVo">
select gc.`id`,gc.`level`,gc.`name`,gc.`parent_id`,gc.`enable`,gc.`is_leaf`,gc.`service_fee`,gc.`software_fee`,
mgc.`tenant_id`,mgc.`parent_tenant_id`,mgc.`software_fee` mall_software_fee
from tt_goods_category gc
left join tt_mall_goods_category mgc on mgc.goods_category_id = gc.id and mgc.tenant_id = #{tenantId}
where 1=1
<if test=" null != categoryId ">
and gc.`id` = #{categoryId}
</if>

<if test=" null != level ">
and gc.`level` = #{level}
</if>

<if test=" null != name ">
and gc.`name` like concat('%', #{name},'%')
</if>

<if test=" null != parentId ">
and gc.`parent_id` = #{parentId}
</if>

<if test=" null != enable ">
and gc.`enable` = #{enable}
</if>

<if test=" null != isLeaf ">
and gc.`is_leaf` = #{isLeaf}
</if>

<if test=" null != isDel ">
and gc.`is_del` = #{isDel}
</if>
<if test=" null != sortColumns"> order by ${sortColumns} </if>

</select>

</mapper>

Loading…
Откажи
Сачувај