| | |
| | | import java.util.Map;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | | import javax.servlet.http.HttpServletRequest;
|
| | |
|
| | | import org.springframework.stereotype.Controller;
|
| | | import org.springframework.web.bind.annotation.RequestMapping;
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserRank;
|
| | | import com.yeshi.fanli.entity.common.AdminUser;
|
| | | import com.yeshi.fanli.entity.money.UserMoneyDetail;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.service.inter.count.UserInfoCountService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.user.BindingAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.ForbiddenUserIdentifyCodeService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyDetailService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserMoneyDetailService userMoneyDetailService;
|
| | | |
| | | @Resource
|
| | | private UserInfoDeleteRecordService userInfoDeleteRecordService;
|
| | | |
| | | @Resource
|
| | | private UserAccountService userAccountService;
|
| | |
|
| | | /**
|
| | | * 查询用户信息列表 正常用户/异常用户
|
| | |
| | | * @param out
|
| | | */
|
| | | @RequestMapping(value = "forbiddenUser")
|
| | | public void forbiddenUser(String callback, Long uid, PrintWriter out) {
|
| | | public void forbiddenUser(String callback, Long uid, HttpServletRequest request, PrintWriter out) {
|
| | | try {
|
| | |
|
| | | if (uid == null) {
|
| | |
| | | return;
|
| | | }
|
| | |
|
| | | userInfoService.forbiddenUser(uid, "管理员封禁");
|
| | | AdminUser admin = (AdminUser) request.getSession().getAttribute(Constant.SESSION_ADMIN);
|
| | | if (admin == null) {
|
| | | JsonUtil.printMode(out, callback, JsonUtil.loadFalseResult("登录失效,请登录"));
|
| | | return;
|
| | | } |
| | | |
| | | String reason = "后台封禁,操作人:" + admin.getId() + "-" + admin.getName();
|
| | | userAccountService.forbiddenUserAll(uid, reason);
|
| | |
|
| | | |
| | | JsonUtil.printMode(out, callback, JsonUtil.loadTrueResult("用户封禁成功"));
|
| | |
|
| | | } catch (Exception e) {
|
| | |
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.config.BusinessSystemService;
|
| | | import com.yeshi.fanli.service.inter.config.ConfigService;
|
| | | import com.yeshi.fanli.service.inter.homemodule.HomeNavbarUserService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoV2Service;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.TBPidService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserMoneyService;
|
| | | import com.yeshi.fanli.service.inter.user.UserShareGoodsRecordService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserAccountBindingHistoryService userAccountBindingHistoryService;
|
| | | |
| | | @Resource
|
| | | private HomeNavbarUserService homeNavbarUserService;
|
| | | |
| | | @Resource
|
| | | private UserInfoDeleteRecordService userInfoDeleteRecordService;
|
| | |
|
| | | private static final String PASSWORD_MAX_ERROR = "password_max_error";
|
| | | private static final String EXTRACT_MIN_MONEY = "extract_min_money";
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的电话号码被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的电话号码");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的淘宝号被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的淘宝号");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的微信号被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的微信号");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的支付宝被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的支付宝");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | final UserInfo uuser = userInfo;
|
| | | ThreadUtil.run(new Runnable() {
|
| | | public void run() {
|
| | | String device = acceptData.getDevice();
|
| | | try {
|
| | | // 同步自定义导航
|
| | | homeNavbarUserService.synchroDeviceToUser(uuser.getId(), device);
|
| | | } catch (Exception e) {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | }
|
| | | |
| | | try {
|
| | | /* 同步未登录之前设备抽奖数据 */
|
| | | int platformType = 0;
|
| | |
| | | } else if ("ios".equals(platform)) {
|
| | | platformType = 2;
|
| | | }
|
| | | userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType,
|
| | | acceptData.getDevice());
|
| | | userSystemCouponService.copyLotteryPrize(uuser.getId(), platformType, device);
|
| | | } catch (Exception e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的电话号码被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的电话号码");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | // 封禁用户
|
| | | // 封禁绑定的正常用户
|
| | | if (user != null && user.getState() != null && user.getState() == UserInfo.STATE_NORMAL) {
|
| | | UserInfo update = new UserInfo(uid);
|
| | | update.setState(UserInfo.STATE_FORBIDDEN);
|
| | | update.setStateDesc("绑定被封禁的微信号被封禁");
|
| | | userInfoService.updateByPrimaryKeySelective(update);
|
| | | userAccountService.forbiddenUser(uid, "封禁:绑定被封禁的微信号");
|
| | | }
|
| | | return;
|
| | | }
|
| | |
| | | |
| | | import com.yeshi.fanli.dao.BaseMapper; |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel; |
| | | import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO; |
| | | |
| | | public interface GoodsSubClassLabelMapper extends BaseMapper<GoodsSubClassLabel> { |
| | | |
| | |
| | | * @return |
| | | */ |
| | | List<GoodsSubClassLabel> listByClassId(@Param("classId") Long classId); |
| | | |
| | | |
| | | /** |
| | | * 查询二级分类、标签 |
| | | * @param classId |
| | | * @return |
| | | */ |
| | | List<GoodsSubClassLabelVO> listSubMapByClassId(@Param("classId") Long classId); |
| | | |
| | | |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | long countBrandShopinfo(@Param("cid") Long cid); |
| | | } |
| | | |
| | | |
| | | |
| | | /** |
| | | * 根据店铺搜索关键词查找 |
| | | * @param key |
| | | * @return |
| | | */ |
| | | List<TaoBaoShopVO> getShopByKey(@Param("key") String key); |
| | | |
| | | } |
| | | |
| | |
| | | import org.yeshi.utils.mybatis.Column;
|
| | | import org.yeshi.utils.mybatis.Table;
|
| | |
|
| | | import com.google.gson.annotations.Expose;
|
| | |
|
| | | /**
|
| | | * 二级分类标签
|
| | | *
|
| | |
| | | public GoodsSubClassLabel() {
|
| | | }
|
| | |
|
| | | @Expose
|
| | | @Column(name = "scl_id")
|
| | | private Long id;// 主键ID
|
| | |
|
| | | @Expose
|
| | | @Column(name = "scl_name")
|
| | | private String name;// 名字
|
| | | @Column(name = "scl_order_by")
|
| | |
| | | @Table("yeshi_ec_home_navbar")
|
| | | public class HomeNavbar implements Serializable{
|
| | |
|
| | | /**
|
| | | * |
| | | */
|
| | | private static final long serialVersionUID = 1L;
|
| | |
|
| | | public enum NavbarTypeEnum {
|
| | |
| | | }
|
| | | }
|
| | |
|
| | |
|
| | | @Expose
|
| | | @Column(name = "br_id")
|
| | | private Long id;
|
| | |
|
| | |
| | | // 状态:1启用 0 停用
|
| | | @Column(name = "br_state")
|
| | | private Integer state;
|
| | |
|
| | | // 是否默认: 0 非默认 1 默认项
|
| | | @Column(name = "br_is_default")
|
| | | private Integer isDefault; |
| | | |
| | | // 编辑状态:0 可编辑 1 不可编辑
|
| | | @Expose
|
| | | @Column(name = "br_non_edit")
|
| | | private Integer nonEdit; |
| | |
|
| | | // 创建时间
|
| | | @Column(name = "br_createtime")
|
| | |
| | | private String swiperName;
|
| | | // 分类名称
|
| | | private String className;
|
| | | |
| | | |
| | | public HomeNavbar() {}
|
| | | |
| | | public HomeNavbar(Long id) {
|
| | | this.id = id;
|
| | | }
|
| | |
|
| | |
|
| | | public Long getId() {
|
| | |
| | | this.className = className;
|
| | | }
|
| | |
|
| | | public Integer getIsDefault() {
|
| | | return isDefault;
|
| | | }
|
| | |
|
| | | public void setIsDefault(Integer isDefault) {
|
| | | this.isDefault = isDefault;
|
| | | }
|
| | |
|
| | | public Integer getNonEdit() {
|
| | | return nonEdit;
|
| | | }
|
| | |
|
| | | public void setNonEdit(Integer nonEdit) {
|
| | | this.nonEdit = nonEdit;
|
| | | }
|
| | | }
|
| | |
| | | @Column(name = "tsi_shop_link")
|
| | | private String shopLink; // 店铺链接
|
| | |
|
| | | @Column(name = "tsi_key")
|
| | | private String key; // 关键词
|
| | | |
| | |
|
| | | public TaoBaoShop() {}
|
| | |
|
| | |
| | | this.shopNameCustom = shopNameCustom;
|
| | | }
|
| | |
|
| | | public String getKey() {
|
| | | return key;
|
| | | }
|
| | |
|
| | | public void setKey(String key) {
|
| | | this.key = key;
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | select="com.yeshi.fanli.dao.mybatis.GoodsClassMapper.selectByPrimaryKey"></association> |
| | | |
| | | </resultMap> |
| | | |
| | | |
| | | <resultMap id="SubMapResultVO" type="com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO"> |
| | | <id column="scl_id" property="id" jdbcType="BIGINT" /> |
| | | <result column="scl_name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="scl_order_by" property="orderBy" jdbcType="INTEGER" /> |
| | | <result column="scl_create_time" property="createTime" jdbcType="TIMESTAMP" /> |
| | | <result column="scl_update_time" property="updateTime" jdbcType="TIMESTAMP" /> |
| | | |
| | | <association property="goodsClass" column="scl_class_id" javaType="com.yeshi.fanli.entity.bus.clazz.GoodsClass"> |
| | | <id column="scl_class_id" property="id" jdbcType="BIGINT" /> |
| | | </association> |
| | | |
| | | <collection property="listSub" column="sub_id" |
| | | resultMap="com.yeshi.fanli.dao.mybatis.GoodsSubClassMapper.SimpleResultMap"/> |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="Base_Column_List">scl_id,scl_name,scl_order_by,scl_class_id,scl_create_time,scl_update_time |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | |
| | | where |
| | | scl_class_id=#{classId} |
| | | </if> |
| | | |
| | | order by scl_order_by |
| | | |
| | | </select> |
| | | |
| | | |
| | | <select id="listSubMapByClassId" resultMap="SubMapResultVO"> |
| | | SELECT t.*,b.* FROM yeshi_ec_sub_class_label t |
| | | LEFT JOIN yeshi_ec_sub_class_label_map p ON t.`scl_id` = p.`sclm_label_id` |
| | | LEFT JOIN yeshi_ec_sub_class b ON b.`sub_id` = p.`sclm_sub_class_id` |
| | | WHERE t.`scl_class_id` = #{classId} AND b.`sub_state` = 1 |
| | | ORDER BY t.`scl_order_by`,p.`sclm_order_by` |
| | | </select> |
| | | |
| | | |
| | | <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from |
| | |
| | | <result column="br_start_time" property="startTime" jdbcType="TIMESTAMP"/> |
| | | <result column="br_end_time" property="endTime" jdbcType="TIMESTAMP"/> |
| | | <result column="br_state" property="state" jdbcType="INTEGER"/> |
| | | <result column="br_is_default" property="isDefault" jdbcType="INTEGER"/> |
| | | <result column="br_non_edit" property="nonEdit" jdbcType="INTEGER"/> |
| | | <result column="br_createtime" property="createtime" jdbcType="TIMESTAMP"/> |
| | | <result column="br_updatetime" property="updatetime" jdbcType="TIMESTAMP"/> |
| | | <result column="br_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.NavbarTypeEnumHandler" /> |
| | | <result column="br_type" property="type" typeHandler="com.yeshi.fanli.util.mybatishandler.NavbarTypeEnumHandler"/> |
| | | </resultMap> |
| | | |
| | | <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_createtime,br_updatetime</sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <sql id="Base_Column_List">br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_is_default,br_non_edit,br_createtime,br_updatetime</sql> |
| | | |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Long">select |
| | | <include refid="Base_Column_List"/>from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT} |
| | | </select> |
| | | |
| | |
| | | delete from yeshi_ec_home_navbar where br_id = #{id,jdbcType=BIGINT} |
| | | </delete> |
| | | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_createtime,br_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar (br_id,br_name,br_picture,br_class_id,br_swiper_banner_id,br_url,br_type,br_orderby,br_start_time,br_end_time,br_state,br_is_default,br_non_edit,br_createtime,br_updatetime) values (#{id,jdbcType=BIGINT},#{name,jdbcType=VARCHAR},#{picture,jdbcType=VARCHAR},#{classId,jdbcType=BIGINT},#{swiperBannerId,jdbcType=BIGINT},#{url,jdbcType=VARCHAR},#{type,jdbcType=VARCHAR},#{orderby,jdbcType=INTEGER},#{startTime,jdbcType=TIMESTAMP},#{endTime,jdbcType=TIMESTAMP},#{state,jdbcType=INTEGER},#{isDefault,jdbcType=INTEGER},#{nonEdit,jdbcType=INTEGER},#{createtime,jdbcType=TIMESTAMP},#{updatetime,jdbcType=TIMESTAMP})</insert> |
| | | |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar" useGeneratedKeys="true" keyProperty="id">insert into yeshi_ec_home_navbar |
| | | <trim prefix="(" suffix=")" suffixOverrides=","> |
| | |
| | | <if test="startTime != null">br_start_time,</if> |
| | | <if test="endTime != null">br_end_time,</if> |
| | | <if test="state != null">br_state,</if> |
| | | <if test="isDefault != null">br_is_default,</if> |
| | | <if test="nonEdit != null">br_non_edit,</if> |
| | | <if test="createtime != null">br_createtime,</if> |
| | | <if test="updatetime != null">br_updatetime,</if> |
| | | </trim>values |
| | |
| | | <if test="startTime != null">#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">#{state,jdbcType=INTEGER},</if> |
| | | <if test="isDefault != null">#{isDefault,jdbcType=INTEGER},</if> |
| | | <if test="nonEdit != null">#{nonEdit,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </trim> |
| | | </insert> |
| | | |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} where br_id = #{id,jdbcType=BIGINT}</update> |
| | | <update id="updateByPrimaryKey" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar set br_name = #{name,jdbcType=VARCHAR},br_picture = #{picture,jdbcType=VARCHAR},br_class_id = #{classId,jdbcType=BIGINT},br_swiper_banner_id = #{swiperBannerId,jdbcType=BIGINT},br_url = #{url,jdbcType=VARCHAR},br_type = #{type,jdbcType=VARCHAR},br_orderby = #{orderby,jdbcType=INTEGER},br_start_time = #{startTime,jdbcType=TIMESTAMP},br_end_time = #{endTime,jdbcType=TIMESTAMP},br_state = #{state,jdbcType=INTEGER},br_is_default = #{isDefault,jdbcType=INTEGER},br_non_edit = #{nonEdit,jdbcType=INTEGER},br_createtime = #{createtime,jdbcType=TIMESTAMP},br_updatetime = #{updatetime,jdbcType=TIMESTAMP} where br_id = #{id,jdbcType=BIGINT}</update> |
| | | |
| | | <update id="updateByPrimaryKeySelective" parameterType="com.yeshi.fanli.entity.bus.homemodule.HomeNavbar">update yeshi_ec_home_navbar |
| | | <set> |
| | |
| | | <if test="startTime != null">br_start_time=#{startTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="endTime != null">br_end_time=#{endTime,jdbcType=TIMESTAMP},</if> |
| | | <if test="state != null">br_state=#{state,jdbcType=INTEGER},</if> |
| | | <if test="isDefault != null">br_is_default=#{isDefault,jdbcType=INTEGER},</if> |
| | | <if test="nonEdit != null">br_non_edit=#{nonEdit,jdbcType=INTEGER},</if> |
| | | <if test="createtime != null">br_createtime=#{createtime,jdbcType=TIMESTAMP},</if> |
| | | <if test="updatetime != null">br_updatetime=#{updatetime,jdbcType=TIMESTAMP},</if> |
| | | </set> where br_id = #{id,jdbcType=BIGINT} |
| | |
| | | <result column="tsi_seller_nick" property="sellerNick" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_link" property="shopLink" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon" property="shopIcon" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon_custom" property="shopIconCustom" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon_custom" property="shopIconCustom" jdbcType="VARCHAR" /> |
| | | <result column="tsi_key" property="key" jdbcType="VARCHAR" /> |
| | | <result column="tsi_score_goods" property="scoreGoods" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="tsi_score_seller" property="scoreSeller" |
| | |
| | | <result column="tsi_seller_nick" property="sellerNick" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_link" property="shopLink" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon" property="shopIcon" jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon_custom" property="shopIconCustom" |
| | | jdbcType="VARCHAR" /> |
| | | <result column="tsi_shop_icon_custom" property="shopIconCustom" jdbcType="VARCHAR" /> |
| | | <result column="tsi_key" property="key" jdbcType="VARCHAR" /> |
| | | <result column="tsi_score_goods" property="scoreGoods" |
| | | jdbcType="DECIMAL" /> |
| | | <result column="tsi_score_seller" property="scoreSeller" |
| | |
| | | </resultMap> |
| | | |
| | | |
| | | <sql id="Base_Column_List">tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage |
| | | <sql id="Base_Column_List">tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_key,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage |
| | | </sql> |
| | | <select id="selectByPrimaryKey" resultMap="BaseResultMap" |
| | | parameterType="java.lang.Long"> |
| | |
| | | <insert id="insert" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop" |
| | | useGeneratedKeys="true" keyProperty="id">insert into |
| | | yeshi_ec_taobao_shop_info |
| | | (tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage) |
| | | (tsi_id,tsi_user_type,tsi_shop_id,tsi_shop_name,tsi_shop_name_custom,tsi_key,tsi_seller_nick,tsi_shop_link,tsi_shop_icon,tsi_shop_icon_custom,tsi_score_goods,tsi_score_seller,tsi_score_logistics,tsi_score_goods_d,tsi_score_seller_d,tsi_score_logistics_d,tsi_update_time,tsi_good_rate_percentage) |
| | | values |
| | | (#{id,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopNameCustom,jdbcType=VARCHAR},#{sellerNick,jdbcType=VARCHAR},#{shopLink,jdbcType=VARCHAR},#{shopIcon,jdbcType=VARCHAR},#{shopIconCustom,jdbcType=VARCHAR},#{scoreGoods,jdbcType=DECIMAL},#{scoreSeller,jdbcType=DECIMAL},#{scoreLogistics,jdbcType=DECIMAL},#{scoreGoodsD,jdbcType=DECIMAL},#{scoreSellerD,jdbcType=DECIMAL},#{scoreLogisticsD,jdbcType=DECIMAL},#{updateTime,jdbcType=TIMESTAMP},#{goodRatePercentage,jdbcType=DECIMAL}) |
| | | (#{id,jdbcType=BIGINT},#{userType,jdbcType=INTEGER},#{shopId,jdbcType=BIGINT},#{shopName,jdbcType=VARCHAR},#{shopNameCustom,jdbcType=VARCHAR},#{key,jdbcType=VARCHAR},#{sellerNick,jdbcType=VARCHAR},#{shopLink,jdbcType=VARCHAR},#{shopIcon,jdbcType=VARCHAR},#{shopIconCustom,jdbcType=VARCHAR},#{scoreGoods,jdbcType=DECIMAL},#{scoreSeller,jdbcType=DECIMAL},#{scoreLogistics,jdbcType=DECIMAL},#{scoreGoodsD,jdbcType=DECIMAL},#{scoreSellerD,jdbcType=DECIMAL},#{scoreLogisticsD,jdbcType=DECIMAL},#{updateTime,jdbcType=TIMESTAMP},#{goodRatePercentage,jdbcType=DECIMAL}) |
| | | </insert> |
| | | <insert id="insertSelective" parameterType="com.yeshi.fanli.entity.taobao.TaoBaoShop" |
| | | useGeneratedKeys="true" keyProperty="id"> |
| | |
| | | <if test="shopLink != null">tsi_shop_link,</if> |
| | | <if test="shopIcon != null">tsi_shop_icon,</if> |
| | | <if test="shopIconCustom != null">tsi_shop_icon_custom,</if> |
| | | <if test="key != null">tsi_key,</if> |
| | | <if test="scoreGoods != null">tsi_score_goods,</if> |
| | | <if test="scoreSeller != null">tsi_score_seller,</if> |
| | | <if test="scoreLogistics != null">tsi_score_logistics,</if> |
| | |
| | | <if test="shopLink != null">#{shopLink,jdbcType=VARCHAR},</if> |
| | | <if test="shopIcon != null">#{shopIcon,jdbcType=VARCHAR},</if> |
| | | <if test="shopIconCustom != null">#{shopIconCustom,jdbcType=VARCHAR},</if> |
| | | <if test="key != null">#{key,jdbcType=VARCHAR},</if> |
| | | <if test="scoreGoods != null">#{scoreGoods,jdbcType=DECIMAL},</if> |
| | | <if test="scoreSeller != null">#{scoreSeller,jdbcType=DECIMAL},</if> |
| | | <if test="scoreLogistics != null">#{scoreLogistics,jdbcType=DECIMAL},</if> |
| | |
| | | tsi_shop_link = #{shopLink,jdbcType=VARCHAR}, |
| | | tsi_shop_icon = #{shopIcon,jdbcType=VARCHAR}, |
| | | tsi_shop_icon_custom = #{shopIconCustom,jdbcType=VARCHAR}, |
| | | tsi_key = #{key,jdbcType=VARCHAR}, |
| | | tsi_score_goods = #{scoreGoods,jdbcType=DECIMAL}, |
| | | tsi_score_seller = #{scoreSeller,jdbcType=DECIMAL}, |
| | | tsi_score_logistics = #{scoreLogistics,jdbcType=DECIMAL}, |
| | |
| | | <if test="shopLink != null">tsi_shop_link=#{shopLink,jdbcType=VARCHAR},</if> |
| | | <if test="shopIcon != null">tsi_shop_icon=#{shopIcon,jdbcType=VARCHAR},</if> |
| | | <if test="shopIconCustom != null">tsi_shop_icon_custom=#{shopIconCustom,jdbcType=VARCHAR},</if> |
| | | <if test="key != null">tsi_key=#{key,jdbcType=VARCHAR},</if> |
| | | <if test="scoreGoods != null">tsi_score_goods=#{scoreGoods,jdbcType=DECIMAL},</if> |
| | | <if test="scoreSeller != null">tsi_score_seller=#{scoreSeller,jdbcType=DECIMAL},</if> |
| | | <if test="scoreLogistics != null">tsi_score_logistics=#{scoreLogistics,jdbcType=DECIMAL},</if> |
| | |
| | | GROUP BY t.`sellerId` HAVING totalGoods<![CDATA[>]]> 2)a |
| | | </select> |
| | | |
| | | <select id="getShopByKey" resultMap="BaseResultVOMap" > |
| | | SELECT * FROM (SELECT COUNT(t.`id`) AS totalGoods,po.* FROM yeshi_ec_taobao_shop_info po |
| | | LEFT JOIN `yeshi_ec_taobao_goods` t ON t.`sellerId` = po.`tsi_id` |
| | | WHERE <![CDATA[t.`couponAmount` > 0 AND po.`tsi_key` LIKE '%${key}%' |
| | | GROUP BY t.`sellerId` HAVING totalGoods> 2]]>)A |
| | | LEFT JOIN (SELECT t.*,po.`tsi_id` FROM yeshi_ec_taobao_shop_info po |
| | | LEFT JOIN `yeshi_ec_taobao_goods` t ON t.`sellerId` = po.`tsi_id` |
| | | WHERE<![CDATA[ t.`couponAmount` > 0 ]]>AND po.`tsi_key` LIKE '%${key}%' |
| | | ORDER BY t.`biz30day` DESC |
| | | LIMIT 3)B ON B.`tsi_id` = A.`tsi_id` |
| | | </select> |
| | | |
| | | </mapper> |
| | |
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.transaction.annotation.Transactional;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapMapper;
|
| | | import com.yeshi.fanli.dao.mybatis.clazz.GoodsSubClassLabelMapper;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClass;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
|
| | | import com.yeshi.fanli.exception.GoodsClassException;
|
| | | import com.yeshi.fanli.service.inter.clazz.GoodsSubClassLabelService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
|
| | |
|
| | | @Service
|
| | | public class GoodsSubClassLabelServiceImpl implements GoodsSubClassLabelService {
|
| | |
| | |
|
| | | @Override
|
| | | public GoodsSubClassLabelMap selectBySubClassId(Long subClassId) {
|
| | |
|
| | | return goodsSubClassLabelMapMapper.selectBySubClassId(subClassId);
|
| | | }
|
| | | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "classCache", key = "'listSubMapCache-'+#classId")
|
| | | public List<GoodsSubClassLabelVO> listSubMapCache(Long classId) {
|
| | | List<GoodsSubClassLabelVO> list = goodsSubClassLabelMapper.listSubMapByClassId(classId);
|
| | | if (list == null || list.size() == 0) {
|
| | | return list;
|
| | | }
|
| | | |
| | | for (int i = 0; i < list.size(); i++) {
|
| | | GoodsSubClassLabelVO labelVO = list.get(i);
|
| | | List<GoodsSubClass> listSub = labelVO.getListSub();
|
| | | if (listSub == null || listSub.size() == 0) {
|
| | | list.remove(labelVO);
|
| | | i--;
|
| | | continue;
|
| | | }
|
| | | |
| | | for (GoodsSubClass goodsSubClass: listSub) {
|
| | | String pictureSecond = goodsSubClass.getPictureSecond();
|
| | | if (!StringUtil.isNullOrEmpty(pictureSecond)) {
|
| | | goodsSubClass.setPicture(pictureSecond);
|
| | | }
|
| | | }
|
| | | |
| | | labelVO.setListSub(listSub);
|
| | | }
|
| | | return list;
|
| | | }
|
| | | |
| | | |
| | | |
| | | }
|
| | |
| | |
|
| | | @Override
|
| | | @Cacheable(value = "classCache", key = "'getEffectiveClassCache'")
|
| | | public List<GoodsClass> getEffectiveClassCache() throws Exception {
|
| | | public List<GoodsClass> getEffectiveClassCache() {
|
| | | return goodsClassMapper.getEffectiveClass();
|
| | | }
|
| | |
|
| | |
| | | import com.yeshi.fanli.service.inter.order.CommonOrderService;
|
| | | import com.yeshi.fanli.service.inter.order.HongBaoOrderService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoPunishOrderService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | |
|
| | | @Service
|
| | | public class TaoBaoPunishOrderServiceImpl implements TaoBaoPunishOrderService {
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | | |
| | | @Resource
|
| | | private UserAccountService userAccountService;
|
| | |
|
| | | @Transactional
|
| | | @Override
|
| | |
| | |
|
| | | for (Iterator<Long> its = uidSets.iterator(); its.hasNext();) {
|
| | | Long uid = its.next();
|
| | | userInfoService.forbiddenUser(uid, "产生违规订单自动封禁");
|
| | | userAccountService.forbiddenUserAll(uid, "产生违规订单自动封禁");
|
| | | }
|
| | |
|
| | | }
|
| | |
| | | package com.yeshi.fanli.service.impl.taobao;
|
| | |
|
| | | import java.io.InputStream;
|
| | | import java.math.BigDecimal;
|
| | | import java.util.ArrayList;
|
| | | import java.util.List;
|
| | | import java.util.UUID;
|
| | |
|
| | | import javax.annotation.Resource;
|
| | |
|
| | | import org.springframework.cache.annotation.Cacheable;
|
| | | import org.springframework.stereotype.Service;
|
| | | import org.springframework.web.multipart.MultipartFile;
|
| | | import org.yeshi.utils.tencentcloud.COSManager;
|
| | |
|
| | | import com.yeshi.fanli.dao.mybatis.taobao.TaoBaoShopMapper;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBrief;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoGoodsBriefExtra;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShop;
|
| | | import com.yeshi.fanli.entity.taobao.TaoBaoShopInfo;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.hongbao.HongBaoManageService;
|
| | | import com.yeshi.fanli.service.inter.taobao.TaoBaoShopService;
|
| | | import com.yeshi.fanli.util.StringUtil;
|
| | | import com.yeshi.fanli.util.db.MongoDBManager;
|
| | |
| | |
|
| | | @Resource
|
| | | private TaoBaoShopMapper taoBaoShopMapper;
|
| | | |
| | | @Resource
|
| | | private HongBaoManageService hongBaoManageService;
|
| | |
|
| | | @Override
|
| | | public TaoBaoShopInfo getTaoBaoShopInfo(TaoBaoGoodsBrief goodsInfo) {
|
| | |
| | | return shop;
|
| | | }
|
| | |
|
| | | |
| | | @Override
|
| | | @Cacheable(value = "brandCache", key = "'getShopByKey-'+#key")
|
| | | public List<TaoBaoShopVO> getShopByKey(String key) {
|
| | | List<TaoBaoShopVO> list = taoBaoShopMapper.getShopByKey(key);
|
| | | if (list == null || list.size() == 0) {
|
| | | return null;
|
| | | }
|
| | |
|
| | | BigDecimal proportion = hongBaoManageService.getFanLiRate();
|
| | | for (TaoBaoShopVO taoBaoShopVO : list) {
|
| | |
|
| | | String shopLink = taoBaoShopVO.getShopLink();
|
| | | if (StringUtil.isNullOrEmpty(shopLink)) {
|
| | | taoBaoShopVO.setShopLink(TaoBaoUtil.getShopLink(taoBaoShopVO.getId()));
|
| | | }
|
| | |
|
| | | String shopNameCustom = taoBaoShopVO.getShopNameCustom();
|
| | | if (!StringUtil.isNullOrEmpty(shopNameCustom)) {
|
| | | taoBaoShopVO.setShopName(shopNameCustom);
|
| | | }
|
| | |
|
| | | String shopIconCustom = taoBaoShopVO.getShopIconCustom();
|
| | | if (!StringUtil.isNullOrEmpty(shopIconCustom)) {
|
| | | taoBaoShopVO.setShopIcon(shopIconCustom);
|
| | | }
|
| | |
|
| | | List<TaoBaoGoodsBriefExtra> listGoods = new ArrayList<TaoBaoGoodsBriefExtra>();
|
| | | List<TaoBaoGoodsBrief> listGoodsBrief = taoBaoShopVO.getListGoodsBrief();
|
| | | for (TaoBaoGoodsBrief taoBaoGoodsBrief : listGoodsBrief) {
|
| | | listGoods.add(TaoBaoUtil.getTaoBaoGoodsBriefExtra(taoBaoGoodsBrief, proportion.toString(), null));
|
| | | }
|
| | | taoBaoShopVO.setListGoods(listGoods);
|
| | | }
|
| | | return list;
|
| | | }
|
| | | }
|
| | |
| | | import com.yeshi.fanli.entity.bus.user.ThreeSale;
|
| | | import com.yeshi.fanli.entity.bus.user.UserAccountBindingHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserConnectHistory;
|
| | | import com.yeshi.fanli.entity.bus.user.UserExtraTaoBaoInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.UserInfo;
|
| | | import com.yeshi.fanli.entity.bus.user.WeiXinUser;
|
| | | import com.yeshi.fanli.exception.UserAccountException;
|
| | | import com.yeshi.fanli.exception.user.ForbiddenUserIdentifyCodeException;
|
| | | import com.yeshi.fanli.log.LogHelper;
|
| | | import com.yeshi.fanli.service.inter.hongbao.ThreeSaleSerivce;
|
| | | import com.yeshi.fanli.service.inter.msg.UserAccountMsgNotificationService;
|
| | |
| | | import com.yeshi.fanli.service.inter.user.UserAccountBindingHistoryService;
|
| | | import com.yeshi.fanli.service.inter.user.UserAccountService;
|
| | | import com.yeshi.fanli.service.inter.user.UserExtraTaoBaoInfoService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoDeleteRecordService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoExtraService;
|
| | | import com.yeshi.fanli.service.inter.user.UserInfoService;
|
| | | import com.yeshi.fanli.util.Constant;
|
| | | import com.yeshi.fanli.util.FileUtil;
|
| | | import com.yeshi.fanli.util.RedisManager;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserInfoMapper userInfoMapper;
|
| | | |
| | | @Resource
|
| | | private UserInfoService userInfoService;
|
| | |
|
| | | @Resource
|
| | | private BindingAccountService bindingAccountService;
|
| | |
| | |
|
| | | @Resource
|
| | | private UserAccountBindingHistoryService userAccountBindingHistoryService;
|
| | | |
| | | @Resource
|
| | | private UserInfoDeleteRecordService userInfoDeleteRecordService;
|
| | | |
| | |
|
| | | @Transactional
|
| | | @Override
|
| | |
| | | int addCount = 0;
|
| | |
|
| | | userAccountMsgNotificationService.connectSuccess(mainUser.getId(), lessUser.getId());
|
| | | |
| | | |
| | | userInfoDeleteRecordService.addDeleteRecord(lessUser.getId(), UserInfo.STATE_DELETE, "删除:账号被打通删除");
|
| | | }
|
| | |
|
| | | /**
|
| | |
| | | userAccountMsgNotificationService.bindingSuccess(uid, MsgAccountDetailFactory.TYPE_WX);
|
| | | }
|
| | |
|
| | | |
| | | |
| | | @Override
|
| | | public void forbiddenUserAll(Long uid, String reason) {
|
| | | UserInfo currentInfo = userInfoService.selectByPKey(uid);
|
| | | if (currentInfo == null) {
|
| | | return;
|
| | | }
|
| | | if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentInfo.setState(UserInfo.STATE_FORBIDDEN);
|
| | | currentInfo.setStateDesc(reason);
|
| | | userInfoService.updateByPrimaryKeySelective(currentInfo);
|
| | | |
| | | // 插入记录
|
| | | userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_FORBIDDEN, reason);
|
| | |
|
| | | // 加入封禁的账号列表
|
| | | ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId());
|
| | | forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 电话号码
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 淘宝
|
| | | UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid);
|
| | | if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) {
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 查询支付宝绑定
|
| | | List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid);
|
| | | if (list != null) {
|
| | | for (BindingAccount ba : list) {
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount());
|
| | | forbiddenUserIdentifyCode.setBeiZhu(ba.getName());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void forbiddenUser(Long uid, String reason) {
|
| | | UserInfo currentInfo = userInfoService.selectByPKey(uid);
|
| | | if (currentInfo == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentInfo.setState(UserInfo.STATE_FORBIDDEN);
|
| | | currentInfo.setStateDesc(reason);
|
| | | userInfoService.updateByPrimaryKeySelective(currentInfo);
|
| | | |
| | | // 插入记录
|
| | | userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_FORBIDDEN, reason);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void DeleteUser(Long uid, String reason) {
|
| | | UserInfo currentInfo = userInfoService.selectByPKey(uid);
|
| | | if (currentInfo == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentInfo.setState(UserInfo.STATE_DELETE);
|
| | | currentInfo.setStateDesc(reason);
|
| | | userInfoService.updateByPrimaryKeySelective(currentInfo);
|
| | | // 插入记录
|
| | | userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_DELETE, reason);
|
| | | }
|
| | | |
| | | |
| | | @Override
|
| | | public void DeleteUserOutOfDate(Long uid, String reason) {
|
| | | UserInfo currentInfo = userInfoService.selectByPKey(uid);
|
| | | if (currentInfo == null) {
|
| | | return;
|
| | | }
|
| | | |
| | | if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentInfo.setState(UserInfo.STATE_DELETE_OUT_OF_DATE);
|
| | | currentInfo.setStateDesc(reason);
|
| | | userInfoService.updateByPrimaryKeySelective(currentInfo);
|
| | | // 插入记录
|
| | | userInfoDeleteRecordService.addDeleteRecord(uid, UserInfo.STATE_DELETE_OUT_OF_DATE, reason);
|
| | | }
|
| | | }
|
| | |
| | | userInfoMapper.updateByPrimaryKeySelective(userInfo);
|
| | | }
|
| | |
|
| | | @Override
|
| | | public void forbiddenUser(Long uid, String reason) {
|
| | | UserInfo currentInfo = userInfoService.selectByPKey(uid);
|
| | | if (currentInfo == null) {
|
| | | return;
|
| | | }
|
| | | if (currentInfo.getState() != UserInfo.STATE_NORMAL) {
|
| | | return;
|
| | | }
|
| | |
|
| | | currentInfo.setState(UserInfo.STATE_FORBIDDEN);
|
| | | currentInfo.setStateDesc(reason);
|
| | | userInfoService.updateByPrimaryKeySelective(currentInfo);
|
| | |
|
| | | // 加入封禁的账号列表
|
| | | ForbiddenUserIdentifyCode forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.wxUnionId);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getWxUnionId());
|
| | | forbiddenUserIdentifyCode.setBeiZhu(currentInfo.getWxName());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 电话号码
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.phone);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(currentInfo.getPhone());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | |
|
| | | // 淘宝
|
| | | UserExtraTaoBaoInfo taoBao = userExtraTaoBaoInfoService.getByUid(uid);
|
| | | if (taoBao != null && !StringUtil.isNullOrEmpty(taoBao.getTaoBaoUid())) {
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.taobaoUid);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(taoBao.getTaoBaoUid());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | |
|
| | | // 查询支付宝绑定
|
| | | List<BindingAccount> list = bindingAccountService.getBindingAccountByUid(uid);
|
| | | if (list != null) {
|
| | | for (BindingAccount ba : list) {
|
| | | forbiddenUserIdentifyCode = new ForbiddenUserIdentifyCode();
|
| | | forbiddenUserIdentifyCode.setType(ForbiddenUserIdentifyCodeTypeEnum.alipayAccount);
|
| | | forbiddenUserIdentifyCode.setIdentifyCode(ba.getAccount());
|
| | | forbiddenUserIdentifyCode.setBeiZhu(ba.getName());
|
| | | try {
|
| | | forbiddenUserIdentifyCodeService.forbiddenIdentifyCode(forbiddenUserIdentifyCode);
|
| | | } catch (ForbiddenUserIdentifyCodeException e) {
|
| | | e.printStackTrace();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | |
| | | recordDTO.setSource(ShareSourceTypeEnum.goodsDetail);
|
| | |
|
| | | // 分享id
|
| | | String key = StringUtil.Md5(uid + "#" + auctionId);
|
| | | String key = StringUtil.Md5(uid + "#GoodsDetail#" + auctionId);
|
| | | redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
|
| | | recordDTO.setRedisKey(key);
|
| | |
|
| | |
| | | recordDTO.setSource(ShareSourceTypeEnum.storage);
|
| | |
|
| | | // 缓存分享商品信息
|
| | | String key = StringUtil.Md5(uid + "##" + id);
|
| | | String key = StringUtil.Md5(uid + "#GoodsStorage#" + id);
|
| | | recordDTO.setRedisKey(key);
|
| | |
|
| | | redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
|
| | |
| | | recordDTO.setSharePictureUrl(uploadResult.getUrl());
|
| | | recordDTO.setSource(ShareSourceTypeEnum.activity);
|
| | | // 缓存分享商品信息
|
| | | String key = StringUtil.Md5(uid + "##" + id);
|
| | | String key = StringUtil.Md5(uid + "#Activity#" + id);
|
| | | recordDTO.setRedisKey(key);
|
| | |
|
| | | redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
|
| | |
| | | recordDTO.setSource(ShareSourceTypeEnum.activity);
|
| | |
|
| | | // 缓存分享商品信息
|
| | | String key = StringUtil.Md5(uid + "##" + id);
|
| | | String key = StringUtil.Md5(uid + "#Dynamic#" + id);
|
| | | recordDTO.setRedisKey(key);
|
| | |
|
| | | redisManager.cacheCommonString(key, JsonUtil.getSimpleGson().toJson(recordDTO), 60 * 20);
|
| | |
| | | }
|
| | | }
|
| | |
|
| | | InputStream inputStream = ImageUtil.drawGoodsShareBigImg(erCodeInputStream, portrait, listGoods);
|
| | | InputStream inputStream = ImageUtil.drawGoodsSharePicture(erCodeInputStream, portrait, listGoods);
|
| | | FileUploadResult shareImg = COSManager.getInstance().uploadInputStream(inputStream,
|
| | | "sharegoods/share_" + uid + "_" + shareId + "_" + System.currentTimeMillis() + ".png");
|
| | |
|
| | |
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabel;
|
| | | import com.yeshi.fanli.entity.bus.clazz.GoodsSubClassLabelMap;
|
| | | import com.yeshi.fanli.exception.GoodsClassException;
|
| | | import com.yeshi.fanli.vo.goods.GoodsSubClassLabelVO;
|
| | |
|
| | | /**
|
| | | * 二级分类的标签服务
|
| | |
| | | */
|
| | | public GoodsSubClassLabelMap selectBySubClassId(Long subClassId);
|
| | |
|
| | | /**
|
| | | * 查询二级分类、标签
|
| | | * @param classId
|
| | | * @return
|
| | | */
|
| | | public List<GoodsSubClassLabelVO> listSubMapCache(Long classId);
|
| | |
|
| | | }
|
| | |
| | | * @return
|
| | | * @throws Exception
|
| | | */
|
| | | public List<GoodsClass> getEffectiveClassCache() throws Exception;
|
| | | public List<GoodsClass> getEffectiveClassCache();
|
| | |
|
| | | /**
|
| | | * 查询所有分类、主子类目
|
| | |
| | | */
|
| | | public List<TaoBaoShopVO> listBrandShopinfo(long start, int count, Long cid);
|
| | |
|
| | | long countBrandShopinfo(Long cid);
|
| | | public long countBrandShopinfo(Long cid);
|
| | |
|
| | | /**
|
| | | * 根据店铺搜索关键词查找
|
| | | * @param key
|
| | | * @return
|
| | | */
|
| | | public List<TaoBaoShopVO> getShopByKey(String key);
|
| | | }
|
| | |
| | | * @throws UserAccountException
|
| | | */
|
| | | public void bindWeiXin(Long uid, String code) throws UserAccountException;
|
| | |
|
| | | /**
|
| | | * 账户封禁
|
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void forbiddenUser(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 封禁用户所有信息:手机号、微信、淘宝、支付宝
|
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void forbiddenUserAll(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 删除账户
|
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void DeleteUser(Long uid, String reason);
|
| | |
|
| | | /**
|
| | | * 长时间未登录账户删除
|
| | | * @param uid
|
| | | * @param reason
|
| | | */
|
| | | public void DeleteUserOutOfDate(Long uid, String reason);
|
| | | }
|
| | |
| | | */
|
| | | public void saveUserInfo(String nickName, Long uid) throws UserInfoException;
|
| | |
|
| | | /**
|
| | | * 封禁用户
|
| | | * |
| | | * @param uid
|
| | | */
|
| | | public void forbiddenUser(Long uid,String reason);
|
| | |
|
| | | }
|
| | |
| | | return null;
|
| | | }
|
| | |
|
| | | |
| | | /**
|
| | | * 绘制大的商品动态分享图
|
| | | * |
| | | * @param qrcodeStream
|
| | | * @param portrait
|
| | | * @param goods
|
| | | * @return
|
| | | */
|
| | | public static InputStream drawGoodsSharePicture(InputStream qrcodeStream, InputStream portrait,
|
| | | List<TaoBaoGoodsBrief> goodsList) {
|
| | |
|
| | | String fontPath = "/usr/share/fonts/PingFang_Medium.ttf";
|
| | | String os = System.getProperty("os.name");
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontPath = "D:/PingFang_Medium.ttf";
|
| | | }
|
| | |
|
| | | String fontBoldPath = "/usr/share/fonts/PingFang_Heavy_0.ttf";
|
| | | if (os.toLowerCase().startsWith("win")) {
|
| | | fontBoldPath = "D:/PingFang_Heavy_0.ttf";
|
| | | }
|
| | |
|
| | | final BufferedImage targetImg = new BufferedImage(1420, 1334, BufferedImage.TYPE_INT_RGB);
|
| | | HashMap<Key, Object> mapH = new HashMap<Key, Object>();
|
| | | mapH.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);// 抗锯齿 (抗锯齿总开关)
|
| | | mapH.put(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_GASP);// 文字抗锯齿
|
| | |
|
| | | final Graphics2D g2d = (Graphics2D) targetImg.getGraphics();
|
| | | g2d.setRenderingHints(mapH);
|
| | |
|
| | | g2d.setColor(Color.WHITE);
|
| | | g2d.fillRect(0, 0, 1420, 1334);
|
| | | Font font = null;
|
| | | try {
|
| | | font = Font.createFont(Font.PLAIN, new File(fontPath)).deriveFont(30.0f);
|
| | | } catch (FontFormatException e1) {
|
| | | e1.printStackTrace();
|
| | | } catch (IOException e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | |
|
| | | Font boldFont = null;
|
| | | try {
|
| | | boldFont = Font.createFont(Font.PLAIN, new File(fontBoldPath)).deriveFont(50.0f);
|
| | | } catch (FontFormatException e2) {
|
| | | e2.printStackTrace();
|
| | | } catch (IOException e2) {
|
| | | e2.printStackTrace();
|
| | | }
|
| | | g2d.setFont(font);
|
| | | |
| | | |
| | | try {
|
| | | // 画第一张
|
| | | for (int i = 0; i < goodsList.size(); i++) {
|
| | | TaoBaoGoodsBrief goods = goodsList.get(i);
|
| | | BigDecimal couplePrice = TaoBaoUtil.getAfterUseCouplePrice(goods);
|
| | | // 第一张图需要有价格信息
|
| | | if (i == 0) {
|
| | | int topX = 50;
|
| | | int topY = 50;
|
| | | |
| | | |
| | | // 画大图 起始点坐标为(50,50)
|
| | | int widht = 650;
|
| | | int height = 650;
|
| | | InputStream goodsPicture = TaoBaoHttpUtil.getAsInputStream(goods.getPictUrl().replace("_.webp", "").replace("_220x220", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = ImageUtil.zoomInImage(picImage, widht, height);
|
| | | g2d.drawImage(picImage, topX, topX, null);
|
| | | |
| | | // 画边框
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, widht + 1, widht + 1);
|
| | | |
| | | // 画透明背景
|
| | | g2d.setColor(new Color(255, 255, 255, 210));
|
| | | g2d.fillRect(10, height - 50, widht + 40, 100);
|
| | | |
| | | |
| | | // 画券后价金额
|
| | | boldFont = boldFont.deriveFont(42.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.setColor(new Color(229, 0, 92));
|
| | | |
| | | g2d.drawString("¥", 70 + 10, height);
|
| | | g2d.drawString(couplePrice + "", 70 + 45, height);
|
| | |
|
| | | // 画原价
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | font = font.deriveFont(24.0f);
|
| | | g2d.setFont(font);
|
| | |
|
| | | String zkPrice = new BigDecimal((couplePrice + "").replace("¥", "")).add(goods.getCouponAmount())
|
| | | .toString();
|
| | | g2d.drawString("¥ " + zkPrice, 70 + 15, height + 30);
|
| | |
|
| | | // 画删除线
|
| | | FontMetrics fm = g2d.getFontMetrics(font);
|
| | | int textLength = fm.stringWidth(zkPrice);
|
| | | g2d.setStroke(new BasicStroke(2.0f));
|
| | | g2d.drawLine(70 + 20, height + 21, 90 + 10 + textLength, height + 21);
|
| | |
|
| | | BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
|
| | | if (withNoZera != null && withNoZera.compareTo(new BigDecimal(0)) > 0) {
|
| | | g2d.setRenderingHints(mapH);
|
| | | |
| | | // 券值得长度
|
| | | int size = withNoZera.toString().length() * 22;
|
| | | int place = withNoZera.toString().length() * 22;
|
| | | |
| | | // 券红色底部
|
| | | int quanBGWidht = widht-100 - place;
|
| | | int quanBGHeight = height - 33;
|
| | | g2d.setColor(new Color(229, 0, 92));
|
| | | g2d.fillRoundRect(quanBGWidht, quanBGHeight, 130 + size, 70, 10, 10);
|
| | | |
| | | // 画券字
|
| | | boldFont = boldFont.deriveFont(40.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.setColor(new Color(255, 255, 255));
|
| | | g2d.drawString("券",quanBGWidht + 8, quanBGHeight + 48);
|
| | | |
| | | // 券白色底部
|
| | | g2d.fillRoundRect(quanBGWidht + 55, quanBGHeight + 4 , 70 + size, 62, 10, 10);
|
| | | |
| | | // 画券面值
|
| | | g2d.setFont(boldFont);
|
| | | g2d.setColor(new Color(229, 0, 92));
|
| | | g2d.drawString("¥ " + withNoZera + "", quanBGWidht + 70, quanBGHeight + 48);
|
| | | }
|
| | |
|
| | | } else {
|
| | | // 计算左上角坐标
|
| | | int topX = 0;
|
| | | int topY = 0;
|
| | | if (i == 1)
|
| | | topX = 50 + (315 + 20) * 0;
|
| | | else if (i == 2 || i % 2 != 0)// 2,3,5,7
|
| | | topX = 50 + (315 + 20) * (i % 2 + 1);
|
| | | else if (i % 2 == 0)// 4,6,8
|
| | | topX = 50 + (315 + 20) * 3;
|
| | |
|
| | | if (i == 1 || i == 2)
|
| | | topY = 50 + 650 + 20;
|
| | | else if (i == 3 || i == 4)
|
| | | topY = 50;
|
| | | else if (i == 5 || i == 6)
|
| | | topY = 50 + (315 + 20) * 1;
|
| | | else if (i == 7 || i == 8)
|
| | | topY = 50 + (315 + 20) * 2;
|
| | |
|
| | | // 画大图
|
| | | InputStream goodsPicture = TaoBaoHttpUtil
|
| | | .getAsInputStream(goods.getPictUrl().replace("_.webp", ""));
|
| | | BufferedImage picImage = ImageIO.read(goodsPicture);
|
| | | picImage = ImageUtil.zoomInImage(picImage, 315, 315);
|
| | | g2d.drawImage(picImage, topX, topY, null);
|
| | |
|
| | | g2d.setColor(new Color(224, 224, 224));
|
| | | // 画边框
|
| | | g2d.setStroke(new BasicStroke(1.0f));
|
| | | g2d.drawRect(topX - 1, topY - 1, 316, 316);
|
| | |
|
| | | // 画券
|
| | | BigDecimal withNoZera = MoneyBigDecimalUtil.getWithNoZera(goods.getCouponAmount());
|
| | | if (withNoZera != null && withNoZera.compareTo(new BigDecimal(0)) > 0) {
|
| | | // // 画透明背景
|
| | | // g2d.setColor(new Color(255, 255, 255, 210));
|
| | | // g2d.fillRect(topX + 8, topY + 240, 300, 65);
|
| | | |
| | | g2d.setRenderingHints(mapH);
|
| | | |
| | | // 券值得长度
|
| | | int size = withNoZera.toString().length() * 22;
|
| | | int place = withNoZera.toString().length() * 22;
|
| | | |
| | | // // 券红色底部
|
| | | int quanBGWidht = topX + 170 - place;
|
| | | int quanBGHeight = topY + 220;
|
| | | g2d.setColor(new Color(229, 0, 92));
|
| | | g2d.fillRoundRect(quanBGWidht, quanBGHeight, 130 + size, 70, 10, 10);
|
| | | |
| | | // 画券字
|
| | | boldFont = boldFont.deriveFont(40.0f);
|
| | | g2d.setFont(boldFont);
|
| | | g2d.setColor(new Color(255, 255, 255));
|
| | | g2d.drawString("券",quanBGWidht + 8, quanBGHeight + 48);
|
| | | |
| | | // 券白色底部
|
| | | g2d.fillRoundRect(quanBGWidht + 55, quanBGHeight + 4 , 70 + size, 62, 10, 10);
|
| | | |
| | | // 画券面值
|
| | | g2d.setFont(boldFont);
|
| | | g2d.setColor(new Color(229, 0, 92));
|
| | | g2d.drawString("¥ " + withNoZera + "", quanBGWidht + 70, quanBGHeight + 48);
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | g2d.setColor(new Color(247, 247, 247));
|
| | | g2d.fillRect(50, 1070, 1320, 214);
|
| | |
|
| | | // 画二维码
|
| | |
|
| | | BufferedImage qrcodeImage = ImageIO.read(qrcodeStream);
|
| | | qrcodeImage = ImageUtil.zoomInImage(qrcodeImage, 170, 170);
|
| | |
|
| | | g2d.drawImage(qrcodeImage, 70, 1092, null);
|
| | |
|
| | | // 画头像
|
| | | if (portrait != null) {
|
| | | BufferedImage portraitImg = ImageIO.read(portrait);
|
| | | // 放缩大小
|
| | | portraitImg = ImageUtil.zoomInImage(portraitImg, 40, 40);
|
| | | // 圆角
|
| | | portraitImg = ImageUtil.roundImage(portraitImg, 10);
|
| | |
|
| | | g2d.drawImage(portraitImg, 70 + (qrcodeImage.getWidth() - portraitImg.getWidth()) / 2,
|
| | | 1092 + (qrcodeImage.getHeight() - portraitImg.getHeight()) / 2, null);
|
| | | }
|
| | |
|
| | | font = font.deriveFont(50.0f);
|
| | | g2d.setFont(font);
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("长按识别二维码免费领券", 312, 1150);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("共", 1000, 1150);
|
| | |
|
| | | g2d.setColor(new Color(229, 0, 93));
|
| | | g2d.drawString(goodsList.size() + "", 1055, 1150);
|
| | |
|
| | | g2d.setColor(new Color(102, 102, 102));
|
| | | g2d.drawString("个商品", 1090, 1150);
|
| | |
|
| | | // 提示语
|
| | | BufferedImage tips = ImageIO
|
| | | .read(ImageUtil.class.getClassLoader().getResourceAsStream("image/share/tips1.png"));
|
| | | tips = ImageUtil.zoomInImage(tips, 850, 65);
|
| | | g2d.drawImage(tips, 312, 1190, null);
|
| | | g2d.dispose();
|
| | |
|
| | | ByteArrayOutputStream aos = new ByteArrayOutputStream();
|
| | | ImageIO.write(targetImg, "JPEG", aos);
|
| | | InputStream is = new ByteArrayInputStream(aos.toByteArray());
|
| | | return is;
|
| | | |
| | | } catch (Exception e) {
|
| | | try {
|
| | | LogHelper.errorDetailInfo(e);
|
| | | } catch (Exception e1) {
|
| | | e1.printStackTrace();
|
| | | }
|
| | | }
|
| | | return null;
|
| | | }
|
| | | |
| | | |
| | | // 画商品分享图
|
| | | public static InputStream drawGoodsShareImgHCJ(InputStream qrcodeStream, InputStream portrait,
|
| | | TaoBaoGoodsBrief goods) throws Exception {
|