yujian
2019-03-15 5f7342955ddb9179c121c57adfd7f7e58d733ddd
用户吐槽 + 精选库手动入库优化
7个文件已修改
6个文件已添加
407 ■■■■ 已修改文件
fanli/src/main/java/com/yeshi/fanli/controller/admin/QualityFactoryAdminController.java 44 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/TaoBaoGoodsBriefAdminController.java 2 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/client/CustomerServiceController.java 36 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserComplaintMapper.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SwiperPicture.java 15 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserComplaint.java 84 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/exception/user/UserComplaintException.java 32 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserComplaintMapper.xml 49 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java 17 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserComplaintServiceImpl.java 78 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/QualityFactoryService.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserComplaintService.java 23 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
fanli/src/main/java/com/yeshi/fanli/controller/admin/QualityFactoryAdminController.java
@@ -72,50 +72,6 @@
    public static final int PROPOR_ASC = 7;
    public static final int PROPOR_DESC = 8;
    /**
     * 批量添加标签 --- 淘宝
     *
     * @param callback
     * @param label
     * @param request
     * @param out
     */
    @RequestMapping(value = "addBatch")
    public void addBatch(String callback, String auctionIds, String lableNames, HttpServletRequest request, PrintWriter out) {
        try {
            // 获取当前操作用户
            AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
            if (admin == null) {
                out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("当前账户失效,请重新登陆。")));
                return;
            }
            if (StringUtil.isNullOrEmpty(auctionIds)) {
                out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请选择正确的商品入库")));
                return;
            }
            Gson gson = new Gson();
            List<Long> auctionIdList = gson.fromJson(auctionIds, new TypeToken<ArrayList<Long>>() {
            }.getType());
            if (auctionIdList == null || auctionIdList.size() == 0) {
                out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("请选择正确的商品入库")));
                return;
            }
            qualityFactoryService.addBatchGoodsByTaoBaoId(auctionIdList,lableNames, admin);
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadTrueResult("添加成功")));
        } catch (Exception e) {
            e.printStackTrace();
            out.print(JsonUtil.loadJSONP(callback, JsonUtil.loadFalseResult("操作异常")));
        }
    }
    /**
     * 保存修改精品库商品关联信息
fanli/src/main/java/com/yeshi/fanli/controller/admin/TaoBaoGoodsBriefAdminController.java
@@ -296,6 +296,8 @@
            AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
            // 插入精选库
            qualityFactoryService.addBatchTaoBaoGoods(listAddGoods, lableNames, admin);
            JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("加入成功"));
        } catch (Exception e) {
            JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult(1, e.getMessage()));
fanli/src/main/java/com/yeshi/fanli/controller/client/CustomerServiceController.java
@@ -1,5 +1,6 @@
package com.yeshi.fanli.controller.client;
import java.io.IOException;
import java.io.PrintWriter;
import java.util.Date;
import java.util.List;
@@ -18,8 +19,10 @@
import com.yeshi.fanli.entity.accept.AcceptData;
import com.yeshi.fanli.entity.customerservice.CustomerServiceCommonQuestion;
import com.yeshi.fanli.entity.customerservice.CustomerServiceHistory;
import com.yeshi.fanli.exception.user.UserComplaintException;
import com.yeshi.fanli.service.inter.customerservice.CustomerServiceCommonQuestionService;
import com.yeshi.fanli.service.inter.customerservice.CustomerServiceHistoryService;
import com.yeshi.fanli.service.inter.user.UserComplaintService;
import com.yeshi.fanli.util.StringUtil;
import net.sf.json.JSONObject;
@@ -39,6 +42,10 @@
    @Resource
    private CustomerServiceHistoryService customerServiceHistoryService;
    @Resource
    private UserComplaintService userComplaintService;
    /**
     * 预设标题的关键字列表
@@ -118,32 +125,25 @@
    
    /**
     *   用户吐槽
     *     用户吐槽记录添加
     * @param fileList
     * @param uid
     * @param content
     * @param out
     */
    @RequestMapping(value = "complaint")
    public void complaint(List<CommonsMultipartFile> fileList, Long uid, String content, PrintWriter out) {
        // 图片最多五张、可以为空
        if (fileList != null && fileList.size() > 5 ) {
            out.print(JsonUtil.loadFalseResult("图片最多可上传五张"));
            return;
        }
        if (content == null || content.trim().length() == 0) {
            out.print(JsonUtil.loadFalseResult("吐槽内容为空"));
            return;
        }
    public void complaint(AcceptData acceptData, List<CommonsMultipartFile> fileList, String content, Long uid, PrintWriter out) {
        try {
            out.print(JsonUtil.loadTrueResult("吐槽"));
            userComplaintService.addUserComplaint(fileList, uid, content);
            out.print(JsonUtil.loadTrueResult("保存成功"));
        } catch (UserComplaintException e) {
            out.print(JsonUtil.loadFalseResult(e.getMsg()));
            e.printStackTrace();
        } catch (IOException e) {
            out.print(JsonUtil.loadFalseResult("图片上传失败失败"));
            e.printStackTrace();
        } catch (Exception e) {
            out.print(JsonUtil.loadFalseResult("操作失败"));
            out.print(JsonUtil.loadFalseResult("保存失败"));
            e.printStackTrace();
        }
    }
fanli/src/main/java/com/yeshi/fanli/dao/mybatis/user/UserComplaintMapper.java
New file
@@ -0,0 +1,8 @@
package com.yeshi.fanli.dao.mybatis.user;
import com.yeshi.fanli.dao.BaseMapper;
import com.yeshi.fanli.entity.bus.user.UserComplaint;
public interface UserComplaintMapper extends BaseMapper<UserComplaint>{
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/homemodule/SwiperPicture.java
@@ -64,12 +64,6 @@
    @org.yeshi.utils.mybatis.Column(name = "pic_jump_need_login")
    private boolean jumpNeedLogin;
        
    // 显示状态:everyday每天展示一次 、always 每次打开首页都展示
    @Expose
    @JoinColumn(name = "pic_show_state")
    @org.yeshi.utils.mybatis.Column(name = "pic_show_state")
    private String showState;
    // 排序
    @JoinColumn(name = "pic_order")
    @org.yeshi.utils.mybatis.Column(name = "pic_order")
@@ -221,14 +215,5 @@
    public void setJumpNeedLogin(boolean jumpNeedLogin) {
        this.jumpNeedLogin = jumpNeedLogin;
    }
    public String getShowState() {
        return showState;
    }
    public void setShowState(String showState) {
        this.showState = showState;
    }
    
}
fanli/src/main/java/com/yeshi/fanli/entity/bus/user/UserComplaint.java
New file
@@ -0,0 +1,84 @@
package com.yeshi.fanli.entity.bus.user;
import java.util.Date;
import org.yeshi.utils.mybatis.Column;
import org.yeshi.utils.mybatis.Table;
/**
 * 用户 吐槽内容
 * @author Administrator
 *
 */
@Table("yeshi_ec_user_complaint")
public class UserComplaint {
    @Column(name = "ucp_id")
    private Long id;
    // 用户
    @Column(name = "ucp_uid")
    private UserInfo userInfo;
    // 反馈内容
    @Column(name = "ucp_content")
    private String content;
    // 反馈图片列表
    @Column(name = "ucp_picture_list")
    private String pictureList;
    // 创建时间
    @Column(name = "ucp_create_time")
    private Date createTime;
    public Long getId() {
        return id;
    }
    public void setId(Long id) {
        this.id = id;
    }
    public UserInfo getUserInfo() {
        return userInfo;
    }
    public void setUserInfo(UserInfo userInfo) {
        this.userInfo = userInfo;
    }
    public String getContent() {
        return content;
    }
    public void setContent(String content) {
        this.content = content;
    }
    public String getPictureList() {
        return pictureList;
    }
    public void setPictureList(String pictureList) {
        this.pictureList = pictureList;
    }
    public Date getCreateTime() {
        return createTime;
    }
    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }
}
fanli/src/main/java/com/yeshi/fanli/exception/user/UserComplaintException.java
New file
@@ -0,0 +1,32 @@
package com.yeshi.fanli.exception.user;
public class UserComplaintException extends Exception {
    /**
     *
     */
    private static final long serialVersionUID = 1L;
    private int code;
    private String msg;
    public int getCode() {
        return code;
    }
    public String getMsg() {
        return msg;
    }
    public UserComplaintException(int code, String msg) {
        this.code = code;
        this.msg = msg;
    }
    public UserComplaintException() {
    }
    @Override
    public String getMessage() {
        return this.msg;
    }
}
fanli/src/main/java/com/yeshi/fanli/mapping/homemodule/SwiperPictureMapper.xml
@@ -8,7 +8,6 @@
    <result column="pic_src" property="src" jdbcType="VARCHAR"/>
    <result column="pic_params" property="params" jdbcType="VARCHAR"/>
    <result column="pic_jump_need_login" property="jumpNeedLogin" jdbcType="VARCHAR"/>
    <result column="pic_show_state" property="showState" jdbcType="VARCHAR"/>
    <result column="pic_order" property="order" jdbcType="INTEGER"/>
    <result column="pic_remark" property="remark" jdbcType="VARCHAR"/>
    <result column="pic_state" property="state" jdbcType="INTEGER"/>
@@ -20,12 +19,12 @@
    <association property="jumpDetail" column="pic_jumpid" resultMap="com.yeshi.fanli.dao.mybatis.common.JumpDetailV2Mapper.BaseResultMap"/>
  </resultMap>
  
  <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime</sql>
  <sql id="Base_Column_List">pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_swiper_banner_picture where pic_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_show_state,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{showState,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{autoControl,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture (pic_id,pic_banner_id,pic_src,pic_jumpid,pic_params,pic_jump_need_login,pic_order,pic_remark,pic_state,pic_auto_control,pic_start_time,pic_end_time,pic_createtime,pic_updatetime) values (#{id,jdbcType=BIGINT},#{bannerId,jdbcType=BIGINT},#{src,jdbcType=VARCHAR},#{jumpDetail.id,jdbcType=BIGINT},#{params,jdbcType=VARCHAR},#{jumpNeedLogin,jdbcType=VARCHAR},#{order,jdbcType=INTEGER},#{remark,jdbcType=VARCHAR},#{state,jdbcType=INTEGER},#{autoControl,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_swiper_banner_picture
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">pic_id,</if>
@@ -34,7 +33,6 @@
      <if test="jumpDetail != null">pic_jumpid,</if>
      <if test="params != null">pic_params,</if>
      <if test="jumpNeedLogin != null">pic_jump_need_login,</if>
      <if test="showState != null">pic_show_state,</if>
      <if test="order != null">pic_order,</if>
      <if test="remark != null">pic_remark,</if>
      <if test="state != null">pic_state,</if>
@@ -51,7 +49,6 @@
      <if test="jumpDetail != null">#{jumpDetail.id,jdbcType=BIGINT},</if>
      <if test="params != null">#{params,jdbcType=VARCHAR},</if>
      <if test="jumpNeedLogin != null">#{jumpNeedLogin,jdbcType=VARCHAR},</if>
      <if test="showState != null">#{showState,jdbcType=VARCHAR},</if>
      <if test="order != null">#{order,jdbcType=INTEGER},</if>
      <if test="remark != null">#{remark,jdbcType=VARCHAR},</if>
      <if test="state != null">#{state,jdbcType=INTEGER},</if>
@@ -62,7 +59,7 @@
      <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_jump_need_login = #{jumpNeedLogin,jdbcType=VARCHAR},pic_show_state = #{showState,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_auto_control = #{autoControl,jdbcType=INTEGER},pic_start_time = #{startTime,jdbcType=TIMESTAMP},pic_end_time = #{endTime,jdbcType=TIMESTAMP},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture set pic_banner_id = #{bannerId,jdbcType=BIGINT},pic_src = #{src,jdbcType=VARCHAR},pic_jumpid = #{jumpDetail.id,jdbcType=BIGINT},pic_params = #{params,jdbcType=VARCHAR},pic_jump_need_login = #{jumpNeedLogin,jdbcType=VARCHAR},pic_order = #{order,jdbcType=INTEGER},pic_remark = #{remark,jdbcType=VARCHAR},pic_state = #{state,jdbcType=INTEGER},pic_auto_control = #{autoControl,jdbcType=INTEGER},pic_start_time = #{startTime,jdbcType=TIMESTAMP},pic_end_time = #{endTime,jdbcType=TIMESTAMP},pic_createtime = #{createtime,jdbcType=TIMESTAMP},pic_updatetime = #{updatetime,jdbcType=TIMESTAMP} where pic_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.SwiperPicture">update yeshi_ec_swiper_banner_picture
    <set>
      <if test="bannerId != null">pic_banner_id=#{bannerId,jdbcType=BIGINT},</if>
@@ -70,7 +67,6 @@
      <if test="jumpDetail != null">pic_jumpid=#{jumpDetail.id,jdbcType=BIGINT},</if>
      <if test="params != null">pic_params=#{params,jdbcType=VARCHAR},</if>
      <if test="jumpNeedLogin != null">pic_jump_need_login=#{jumpNeedLogin,jdbcType=VARCHAR},</if>
      <if test="showState != null">pic_show_state=#{showState,jdbcType=VARCHAR},</if>
      <if test="order != null">pic_order=#{order,jdbcType=INTEGER},</if>
      <if test="remark != null">pic_remark=#{remark,jdbcType=VARCHAR},</if>
      <if test="state != null">pic_state=#{state,jdbcType=INTEGER},</if>
fanli/src/main/java/com/yeshi/fanli/mapping/user/UserComplaintMapper.xml
New file
@@ -0,0 +1,49 @@
<?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.yeshi.fanli.dao.mybatis.user.UserComplaintMapper">
  <resultMap id="BaseResultMap" type="com.yeshi.fanli.entity.bus.user.UserComplaint">
    <id column="ucp_id" property="id" jdbcType="BIGINT"/>
    <result column="ucp_content" property="content" jdbcType="VARCHAR"/>
    <result column="ucp_picture_list" property="pictureList" jdbcType="VARCHAR"/>
    <result column="ucp_create_time" property="createTime" jdbcType="TIMESTAMP"/>
      <association property="userInfo" column="ucp_uid" javaType="com.yeshi.fanli.entity.bus.user.UserInfo">
          <id column="ucp_uid" property="id" jdbcType="BIGINT"/>
      </association>
  </resultMap>
  <sql id="Base_Column_List">ucp_id,ucp_uid,ucp_content,ucp_picture_list,ucp_create_time</sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select
    <include refid="Base_Column_List"/>from yeshi_ec_user_complaint where ucp_id = #{id,jdbcType=BIGINT}
  </select>
  <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_user_complaint where ucp_id = #{id,jdbcType=BIGINT}</delete>
  <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.user.UserComplaint" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_complaint (ucp_id,ucp_uid,ucp_content,ucp_picture_list,ucp_create_time) values (#{id,jdbcType=BIGINT},#{userInfo.id,jdbcType=BIGINT},#{content,jdbcType=VARCHAR},#{pictureList,jdbcType=VARCHAR},#{createTime,jdbcType=TIMESTAMP})</insert>
  <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.user.UserComplaint" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_user_complaint
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">ucp_id,</if>
      <if test="userInfo != null">ucp_uid,</if>
      <if test="content != null">ucp_content,</if>
      <if test="pictureList != null">ucp_picture_list,</if>
      <if test="createTime != null">ucp_create_time,</if>
    </trim>values
    <trim prefix="(" suffix=")" suffixOverrides=",">
      <if test="id != null">#{id,jdbcType=BIGINT},</if>
      <if test="userInfo != null">#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="content != null">#{content,jdbcType=VARCHAR},</if>
      <if test="pictureList != null">#{pictureList,jdbcType=VARCHAR},</if>
      <if test="createTime != null">#{createTime,jdbcType=TIMESTAMP},</if>
    </trim>
  </insert>
  <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.user.UserComplaint">update yeshi_ec_user_complaint set ucp_uid = #{userInfo.id,jdbcType=BIGINT},ucp_content = #{content,jdbcType=VARCHAR},ucp_picture_list = #{pictureList,jdbcType=VARCHAR},ucp_create_time = #{createTime,jdbcType=TIMESTAMP} where ucp_id = #{id,jdbcType=BIGINT}</update>
  <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.user.UserComplaint">update yeshi_ec_user_complaint
    <set>
      <if test="userInfo != null">ucp_uid=#{userInfo.id,jdbcType=BIGINT},</if>
      <if test="content != null">ucp_content=#{content,jdbcType=VARCHAR},</if>
      <if test="pictureList != null">ucp_picture_list=#{pictureList,jdbcType=VARCHAR},</if>
      <if test="createTime != null">ucp_create_time=#{createTime,jdbcType=TIMESTAMP},</if>
    </set> where ucp_id = #{id,jdbcType=BIGINT}
  </update>
</mapper>
fanli/src/main/java/com/yeshi/fanli/service/impl/lable/QualityFactoryServiceImpl.java
@@ -196,23 +196,6 @@
        return qualityFactoryMapper.listQueryByAuctionId(list);
    }
    @Override
    @Transactional
    public void addBatchGoodsByTaoBaoId(List<Long> listTaoBaoId, String lableNames, AdminUser admin)
            throws Exception {
        List<TaoBaoGoodsBrief> listAddGoods = new ArrayList<TaoBaoGoodsBrief>();
        if (listTaoBaoId != null && listTaoBaoId.size() > 0) {
            for (Long auctionId: listTaoBaoId) {
                /* 根据auctionId 获取淘宝商品 */
                TaoBaoGoodsBrief goodsBrief = TaoKeApiUtil.searchGoodsDetail(auctionId);
                if (goodsBrief != null) {
                    listAddGoods.add(goodsBrief);
                }
            }
        }
    }
    
    @Override
    @Transactional
fanli/src/main/java/com/yeshi/fanli/service/impl/user/UserComplaintServiceImpl.java
New file
@@ -0,0 +1,78 @@
package com.yeshi.fanli.service.impl.user;
import java.io.IOException;
import java.io.InputStream;
import java.util.Date;
import java.util.List;
import java.util.UUID;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import org.yeshi.utils.tencentcloud.COSManager;
import com.yeshi.fanli.dao.mybatis.user.UserComplaintMapper;
import com.yeshi.fanli.entity.bus.user.UserComplaint;
import com.yeshi.fanli.entity.bus.user.UserInfo;
import com.yeshi.fanli.exception.user.UserComplaintException;
import com.yeshi.fanli.service.inter.user.UserComplaintService;
import net.sf.json.JSONArray;
@Service
public class UserComplaintServiceImpl implements UserComplaintService {
    @Resource
    private UserComplaintMapper userComplaintMapper;
    @Override
    public void addUserComplaint(List<CommonsMultipartFile> fileList, Long uid, String content)
            throws UserComplaintException, IOException, Exception {
        if (content == null || content.trim().length() == 0) {
            throw new UserComplaintException(1, "吐槽内容不能为空");
        }
        // 图片最多五张、可以为空
        if (fileList != null && fileList.size() > 5 ) {
            throw new UserComplaintException(1, "图片最多可上传五张");
        }
        // 图片列表
        String pictureList = null;
        if (fileList != null && fileList.size() > 0) {
            JSONArray array = new JSONArray();
            // 文件上传
            for (CommonsMultipartFile file: fileList) {
                InputStream inputStream = file.getInputStream();
                String contentType = file.getContentType();
                String type = contentType.substring(contentType.indexOf("/") + 1);
                // 上传文件相对位置
                String fileUrl="/img/UserComplaint/"+UUID.randomUUID().toString().replace("-", "") + "." + type;
                String uploadFilePath = COSManager.getInstance().uploadFile(inputStream, fileUrl).getUrl();
                array.add(uploadFilePath);
            }
            pictureList = array.toString();
        }
        UserInfo userInfo = null;
        if (uid != null) {
            userInfo = new UserInfo();
            userInfo.setId(uid);
        }
        UserComplaint userComplaint = new UserComplaint();
        userComplaint.setContent(content);
        userComplaint.setPictureList(pictureList);
        userComplaint.setUserInfo(userInfo);
        userComplaint.setCreateTime(new Date());
        userComplaintMapper.insertSelective(userComplaint);
    }
}
fanli/src/main/java/com/yeshi/fanli/service/inter/lable/QualityFactoryService.java
@@ -221,13 +221,4 @@
    public void addBatchTaoBaoGoods(List<TaoBaoGoodsBrief> listTaoBaoGoods, String lableNames, AdminUser admin)
            throws Exception;
    /**
     * 根据淘宝id获取详情插入精选库
     * @param listTaoBaoId
     * @param lableNames
     * @param admin
     * @throws Exception
     */
    public void addBatchGoodsByTaoBaoId(List<Long> listTaoBaoId, String lableNames, AdminUser admin) throws Exception;
}
fanli/src/main/java/com/yeshi/fanli/service/inter/user/UserComplaintService.java
New file
@@ -0,0 +1,23 @@
package com.yeshi.fanli.service.inter.user;
import java.io.IOException;
import java.util.List;
import org.springframework.web.multipart.commons.CommonsMultipartFile;
import com.yeshi.fanli.exception.user.UserComplaintException;
public interface UserComplaintService {
    /**
     *  新增用户吐槽记录
     * @param fileList 文件列表可为空
     * @param uid  用户id 可为空
     * @param content    内容
     * @throws UserComplaintException
     */
    public void addUserComplaint(List<CommonsMultipartFile> fileList, Long uid, String content)
            throws UserComplaintException, IOException, Exception;
}