Просмотр исходного кода

//goodsc

release_toaliyun_real
xhxu 3 лет назад
Родитель
Сommit
2fefe05f90
8 измененных файлов: 159 добавлений и 3 удалений
  1. +32
    -0
      mallinkService/src/main/java/com/iformall/domain/po/TtMallGoodsCategory.java
  2. +1
    -1
      mallinkService/src/main/java/com/iformall/mapper/TtGoodsCategoryMapper.java
  3. +19
    -0
      mallinkService/src/main/java/com/iformall/mapper/TtMallGoodsCategoryMapper.java
  4. +6
    -0
      mallinkService/src/main/java/com/iformall/service/TtMallGoodsCategoryService.java
  5. +1
    -1
      mallinkService/src/main/java/com/iformall/service/impl/TtGoodsCategoryServiceImpl.java
  6. +31
    -0
      mallinkService/src/main/java/com/iformall/service/impl/TtMallGoodsCategoryServiceImpl.java
  7. +1
    -1
      mallinkService/src/main/resources/mapper/TtGoodsCategoryMapper.xml
  8. +68
    -0
      mallinkService/src/main/resources/mapper/TtMallGoodsCategoryMapper.xml

+ 32
- 0
mallinkService/src/main/java/com/iformall/domain/po/TtMallGoodsCategory.java Просмотреть файл

@@ -0,0 +1,32 @@
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;

}

+ 1
- 1
mallinkService/src/main/java/com/iformall/mapper/TtGoodsCategoryMapper.java Просмотреть файл

@@ -14,5 +14,5 @@ public interface TtGoodsCategoryMapper extends CommonMapper<TtGoodsCategory, Str

int updDelByIds(TtGoodsCategory record);

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

+ 19
- 0
mallinkService/src/main/java/com/iformall/mapper/TtMallGoodsCategoryMapper.java Просмотреть файл

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

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

import java.util.List;

public interface TtMallGoodsCategoryMapper extends CommonMapper<TtMallGoodsCategory, String> {

List<TtMallGoodsCategory> findList(TtMallGoodsCategory record);

List<Integer> findIdAll(TtMallGoodsCategory record);

int updDelByIds(TtMallGoodsCategory record);

int updateFeeByIds(TtMallGoodsCategory record);

}

+ 6
- 0
mallinkService/src/main/java/com/iformall/service/TtMallGoodsCategoryService.java Просмотреть файл

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

public interface TtMallGoodsCategoryService {


}

+ 1
- 1
mallinkService/src/main/java/com/iformall/service/impl/TtGoodsCategoryServiceImpl.java Просмотреть файл

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


+ 31
- 0
mallinkService/src/main/java/com/iformall/service/impl/TtMallGoodsCategoryServiceImpl.java Просмотреть файл

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


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;

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

@Autowired
private TtMerchantPoiService ttMerchantPoiService;

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



}

+ 1
- 1
mallinkService/src/main/resources/mapper/TtGoodsCategoryMapper.xml Просмотреть файл

@@ -81,7 +81,7 @@
</foreach>
</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}
<if test=" null != serviceFee ">,`service_fee` = #{serviceFee}</if>
<if test=" null != softwareFee ">,`software_fee` = #{softwareFee}</if>


+ 68
- 0
mallinkService/src/main/resources/mapper/TtMallGoodsCategoryMapper.xml Просмотреть файл

@@ -0,0 +1,68 @@
<?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>

</mapper>

Загрузка…
Отмена
Сохранить