Merge branch 'test6.9.0' into test6.9.1
Showing
13 changed files
with
184 additions
and
48 deletions
@@ -41,6 +41,9 @@ public interface ImagesConstant { | @@ -41,6 +41,9 @@ public interface ImagesConstant { | ||
41 | // 品牌图片,与前台兼容 | 41 | // 品牌图片,与前台兼容 |
42 | String BUCKET_BRAND_LOGO = "brandLogo"; | 42 | String BUCKET_BRAND_LOGO = "brandLogo"; |
43 | 43 | ||
44 | + // 品牌搜索大图 | ||
45 | + String BUCKET_SEARCH_SHOW_IMAGE = "searchShowImage"; | ||
46 | + | ||
44 | // 销售类目图片 | 47 | // 销售类目图片 |
45 | String BUCKET_SALES_CATEGORY = "taobaocms"; | 48 | String BUCKET_SALES_CATEGORY = "taobaocms"; |
46 | 49 |
@@ -38,6 +38,7 @@ public class ImagesHelper extends com.yoho.core.common.helpers.ImagesHelper{ | @@ -38,6 +38,7 @@ public class ImagesHelper extends com.yoho.core.common.helpers.ImagesHelper{ | ||
38 | BUCKET_LIST.put(ImagesConstant.BUCKET_SNS, ImagesConstant.BUCKET_SNS); | 38 | BUCKET_LIST.put(ImagesConstant.BUCKET_SNS, ImagesConstant.BUCKET_SNS); |
39 | BUCKET_LIST.put(ImagesConstant.BUCKET_EVIDENCE, ImagesConstant.BUCKET_EVIDENCE); | 39 | BUCKET_LIST.put(ImagesConstant.BUCKET_EVIDENCE, ImagesConstant.BUCKET_EVIDENCE); |
40 | BUCKET_LIST.put(ImagesConstant.BUCKET_BRAND_LOGO, ImagesConstant.BUCKET_BRAND_LOGO); | 40 | BUCKET_LIST.put(ImagesConstant.BUCKET_BRAND_LOGO, ImagesConstant.BUCKET_BRAND_LOGO); |
41 | + BUCKET_LIST.put(ImagesConstant.BUCKET_SEARCH_SHOW_IMAGE, ImagesConstant.BUCKET_SEARCH_SHOW_IMAGE); | ||
41 | BUCKET_LIST.put(ImagesConstant.BUCKET_GOODS_VIDEO, ImagesConstant.BUCKET_GOODS_VIDEO); | 42 | BUCKET_LIST.put(ImagesConstant.BUCKET_GOODS_VIDEO, ImagesConstant.BUCKET_GOODS_VIDEO); |
42 | BUCKET_LIST.put(ImagesConstant.BUCKET_ACTIVITY_PIC, ImagesConstant.BUCKET_ACTIVITY_PIC); | 43 | BUCKET_LIST.put(ImagesConstant.BUCKET_ACTIVITY_PIC, ImagesConstant.BUCKET_ACTIVITY_PIC); |
43 | BUCKET_LIST.put(ImagesConstant.BUCKET_PLUSTAR, ImagesConstant.BUCKET_PLUSTAR); | 44 | BUCKET_LIST.put(ImagesConstant.BUCKET_PLUSTAR, ImagesConstant.BUCKET_PLUSTAR); |
1 | +package com.yoho.order.model; | ||
2 | + | ||
3 | +import lombok.Data; | ||
4 | +import lombok.ToString; | ||
5 | + | ||
6 | +/** | ||
7 | + * Created by craig.qin | ||
8 | + */ | ||
9 | +@ToString | ||
10 | +@Data | ||
11 | +public class OrderConfig { | ||
12 | + | ||
13 | + private Integer id; | ||
14 | + private String code; | ||
15 | + private String name; | ||
16 | + private String content; | ||
17 | + private Integer createTime; | ||
18 | + | ||
19 | + | ||
20 | +} |
@@ -29,6 +29,8 @@ public class Brand implements Serializable { | @@ -29,6 +29,8 @@ public class Brand implements Serializable { | ||
29 | 29 | ||
30 | private Integer editPid; | 30 | private Integer editPid; |
31 | 31 | ||
32 | + private String searchShowImage; | ||
33 | + | ||
32 | public Integer getId() { | 34 | public Integer getId() { |
33 | return id; | 35 | return id; |
34 | } | 36 | } |
@@ -101,6 +103,13 @@ public class Brand implements Serializable { | @@ -101,6 +103,13 @@ public class Brand implements Serializable { | ||
101 | this.editPid = editPid; | 103 | this.editPid = editPid; |
102 | } | 104 | } |
103 | 105 | ||
106 | + public String getSearchShowImage() { | ||
107 | + return searchShowImage; | ||
108 | + } | ||
109 | + | ||
110 | + public void setSearchShowImage(String searchShowImage) { | ||
111 | + this.searchShowImage = searchShowImage; | ||
112 | + } | ||
104 | 113 | ||
105 | @Override | 114 | @Override |
106 | public String toString() { | 115 | public String toString() { |
@@ -114,6 +123,7 @@ public class Brand implements Serializable { | @@ -114,6 +123,7 @@ public class Brand implements Serializable { | ||
114 | ", createTime=" + createTime + | 123 | ", createTime=" + createTime + |
115 | ", editTime=" + editTime + | 124 | ", editTime=" + editTime + |
116 | ", editPid=" + editPid + | 125 | ", editPid=" + editPid + |
126 | + ", searchShowImage=" + searchShowImage + | ||
117 | '}'; | 127 | '}'; |
118 | } | 128 | } |
119 | } | 129 | } |
@@ -12,15 +12,16 @@ | @@ -12,15 +12,16 @@ | ||
12 | <result property="editTime" column="edit_time"/> | 12 | <result property="editTime" column="edit_time"/> |
13 | <result property="createTime" column="create_time"/> | 13 | <result property="createTime" column="create_time"/> |
14 | <result property="editPid" column="edit_pid"/> | 14 | <result property="editPid" column="edit_pid"/> |
15 | + <result property="search_show_image" column="searchShowImage"/> | ||
15 | </resultMap> | 16 | </resultMap> |
16 | 17 | ||
17 | <sql id="queryColumns"> | 18 | <sql id="queryColumns"> |
18 | - id, brand_name, brand_name_en, brand_logo, brand_search, status, create_time | 19 | + id, brand_name, brand_name_en, brand_logo, brand_search, status, create_time, search_show_image |
19 | </sql> | 20 | </sql> |
20 | 21 | ||
21 | <insert id="insertBrand" parameterType="com.yoho.ufo.model.brand.Brand"> | 22 | <insert id="insertBrand" parameterType="com.yoho.ufo.model.brand.Brand"> |
22 | - insert into brand(id, brand_name, brand_name_en, brand_logo, brand_search, status, create_time, edit_time, edit_pid) | ||
23 | - values (#{id}, #{brandName}, #{brandNameEn}, #{brandLogo}, #{brandSearch}, #{status}, #{createTime}, #{editTime}, #{editPid}) | 23 | + insert into brand(id, brand_name, brand_name_en, brand_logo, search_show_image, brand_search, status, create_time, edit_time, edit_pid) |
24 | + values (#{id}, #{brandName}, #{brandNameEn}, #{brandLogo}, #{searchShowImage}, #{brandSearch}, #{status}, #{createTime}, #{editTime}, #{editPid}) | ||
24 | </insert> | 25 | </insert> |
25 | 26 | ||
26 | <update id="updateBrandStatus" parameterType="com.yoho.ufo.model.brand.Brand"> | 27 | <update id="updateBrandStatus" parameterType="com.yoho.ufo.model.brand.Brand"> |
@@ -51,7 +52,8 @@ | @@ -51,7 +52,8 @@ | ||
51 | <if test="brand.editPid != null"> | 52 | <if test="brand.editPid != null"> |
52 | edit_pid = #{brand.editPid}, | 53 | edit_pid = #{brand.editPid}, |
53 | </if> | 54 | </if> |
54 | - brand_search = #{brand.brandSearch} | 55 | + brand_search = #{brand.brandSearch}, |
56 | + search_show_image = #{brand.searchShowImage} | ||
55 | </set> | 57 | </set> |
56 | where id = #{brand.id} | 58 | where id = #{brand.id} |
57 | </update> | 59 | </update> |
1 | +<?xml version="1.0" encoding="UTF-8" ?> | ||
2 | +<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd" > | ||
3 | +<mapper namespace="com.yoho.order.dal.OrderConfigMapper"> | ||
4 | + <resultMap id="BaseResultMap" type="com.yoho.order.model.OrderConfig"> | ||
5 | + <result column="id" property="id" jdbcType="INTEGER" /> | ||
6 | + <result column="code" property="code" jdbcType="VARCHAR" /> | ||
7 | + <result column="name" property="name" jdbcType="VARCHAR" /> | ||
8 | + <result column="content" property="content" jdbcType="VARCHAR" /> | ||
9 | + <result column="create_time" property="createTime" jdbcType="INTEGER" /> | ||
10 | + </resultMap> | ||
11 | + | ||
12 | + <sql id="Base_Column_List"> | ||
13 | + id, code, name, content, create_time | ||
14 | + </sql> | ||
15 | + | ||
16 | + <select id="selectByCode" resultMap="BaseResultMap"> | ||
17 | + select <include refid="Base_Column_List" /> | ||
18 | + from order_config where code=#{code} | ||
19 | + </select> | ||
20 | + | ||
21 | + | ||
22 | +</mapper> |
1 | package com.yoho.ufo.order.service.impl; | 1 | package com.yoho.ufo.order.service.impl; |
2 | 2 | ||
3 | -import java.math.BigDecimal; | ||
4 | -import java.util.ArrayList; | ||
5 | -import java.util.Arrays; | ||
6 | -import java.util.Collections; | ||
7 | -import java.util.HashSet; | ||
8 | -import java.util.List; | ||
9 | -import java.util.Map; | ||
10 | -import java.util.Objects; | ||
11 | -import java.util.Set; | ||
12 | -import java.util.concurrent.TimeUnit; | ||
13 | -import java.util.stream.Collectors; | ||
14 | - | ||
15 | -import javax.annotation.Resource; | ||
16 | - | ||
17 | -import com.yoho.order.dal.*; | ||
18 | -import com.yoho.order.model.*; | ||
19 | -import com.yoho.core.dal.datasource.annotation.Database; | ||
20 | -import org.apache.commons.collections.CollectionUtils; | ||
21 | -import org.apache.commons.lang3.StringUtils; | ||
22 | -import org.elasticsearch.common.collect.Lists; | ||
23 | -import org.elasticsearch.common.collect.Maps; | ||
24 | -import org.elasticsearch.common.netty.util.internal.StringUtil; | ||
25 | -import org.slf4j.Logger; | ||
26 | -import org.slf4j.LoggerFactory; | ||
27 | -import org.springframework.beans.factory.annotation.Autowired; | ||
28 | -import org.springframework.beans.factory.annotation.Value; | ||
29 | -import org.springframework.http.HttpEntity; | ||
30 | -import org.springframework.http.HttpHeaders; | ||
31 | -import org.springframework.http.MediaType; | ||
32 | -import org.springframework.http.ResponseEntity; | ||
33 | -import org.springframework.stereotype.Service; | ||
34 | -import org.springframework.web.client.RestTemplate; | ||
35 | - | ||
36 | import com.alibaba.fastjson.JSON; | 3 | import com.alibaba.fastjson.JSON; |
37 | import com.alibaba.fastjson.JSONObject; | 4 | import com.alibaba.fastjson.JSONObject; |
5 | +import com.google.common.base.Splitter; | ||
6 | +import com.yoho.core.dal.datasource.annotation.Database; | ||
38 | import com.yoho.core.redis.cluster.annotation.Redis; | 7 | import com.yoho.core.redis.cluster.annotation.Redis; |
39 | import com.yoho.core.redis.cluster.operations.nosync.YHValueOperations; | 8 | import com.yoho.core.redis.cluster.operations.nosync.YHValueOperations; |
40 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; | 9 | import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder; |
41 | import com.yoho.core.rest.client.ServiceCaller; | 10 | import com.yoho.core.rest.client.ServiceCaller; |
42 | import com.yoho.error.exception.ServiceException; | 11 | import com.yoho.error.exception.ServiceException; |
12 | +import com.yoho.order.dal.*; | ||
13 | +import com.yoho.order.model.*; | ||
43 | import com.yoho.service.model.order.request.OrderRequest; | 14 | import com.yoho.service.model.order.request.OrderRequest; |
44 | import com.yoho.ufo.constants.PlatformConstant; | 15 | import com.yoho.ufo.constants.PlatformConstant; |
45 | import com.yoho.ufo.constants.RedisKeyConstants; | 16 | import com.yoho.ufo.constants.RedisKeyConstants; |
@@ -63,11 +34,28 @@ import com.yohobuy.ufo.model.order.common.EnumQualityCheckType; | @@ -63,11 +34,28 @@ import com.yohobuy.ufo.model.order.common.EnumQualityCheckType; | ||
63 | import com.yohobuy.ufo.model.order.common.OperateTypeEnum; | 34 | import com.yohobuy.ufo.model.order.common.OperateTypeEnum; |
64 | import com.yohobuy.ufo.model.order.constants.QNliveConstants; | 35 | import com.yohobuy.ufo.model.order.constants.QNliveConstants; |
65 | import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq; | 36 | import com.yohobuy.ufo.model.order.req.BuyerOrderMetaUpdateReq; |
66 | -import com.yohobuy.ufo.model.order.resp.BuyerOrderResp; | ||
67 | -import com.yohobuy.ufo.model.order.resp.ExpressInfoResp; | ||
68 | -import com.yohobuy.ufo.model.order.resp.OrderDetailResp; | ||
69 | -import com.yohobuy.ufo.model.order.resp.OrderOperateRecordResp; | ||
70 | -import com.yohobuy.ufo.model.order.resp.QcOrderDetailResp; | 37 | +import com.yohobuy.ufo.model.order.resp.*; |
38 | +import org.apache.commons.collections.CollectionUtils; | ||
39 | +import org.apache.commons.lang3.StringUtils; | ||
40 | +import org.elasticsearch.common.collect.Lists; | ||
41 | +import org.elasticsearch.common.collect.Maps; | ||
42 | +import org.elasticsearch.common.netty.util.internal.StringUtil; | ||
43 | +import org.slf4j.Logger; | ||
44 | +import org.slf4j.LoggerFactory; | ||
45 | +import org.springframework.beans.factory.annotation.Autowired; | ||
46 | +import org.springframework.beans.factory.annotation.Value; | ||
47 | +import org.springframework.http.HttpEntity; | ||
48 | +import org.springframework.http.HttpHeaders; | ||
49 | +import org.springframework.http.MediaType; | ||
50 | +import org.springframework.http.ResponseEntity; | ||
51 | +import org.springframework.stereotype.Service; | ||
52 | +import org.springframework.web.client.RestTemplate; | ||
53 | + | ||
54 | +import javax.annotation.Resource; | ||
55 | +import java.math.BigDecimal; | ||
56 | +import java.util.*; | ||
57 | +import java.util.concurrent.TimeUnit; | ||
58 | +import java.util.stream.Collectors; | ||
71 | 59 | ||
72 | /** | 60 | /** |
73 | * @author caoyan | 61 | * @author caoyan |
@@ -138,12 +126,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -138,12 +126,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
138 | @Autowired | 126 | @Autowired |
139 | private BuyerOrderFeedbackService buyerOrderFeedbackService; | 127 | private BuyerOrderFeedbackService buyerOrderFeedbackService; |
140 | 128 | ||
129 | + @Autowired | ||
130 | + private OrderConfigMapper orderConfigMapper; | ||
131 | + | ||
141 | private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address"; | 132 | private static final String BUYER_ORDER_META_KEY_DELIVERY_ADDRESS = "delivery_address"; |
142 | 133 | ||
143 | private static final String SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS = "back_delivery_address"; | 134 | private static final String SELLER_ORDER_META_KEY_BACK_DELIVERY_ADDRESS = "back_delivery_address"; |
144 | 135 | ||
145 | private static final String SELLER_ORDER_META_KEY_FEE = "fee"; | 136 | private static final String SELLER_ORDER_META_KEY_FEE = "fee"; |
146 | 137 | ||
138 | + private static final String ORDER_CONFIG_INNER_BUYER_FOR_OFFLINE = "inner_buyer_for_offline"; | ||
139 | + | ||
147 | private static final Integer EXPRESS_TYPE_SELLER_TO_JUDGE = EnumExpressType.EXPRESS_TYPE_1.getCode(); | 140 | private static final Integer EXPRESS_TYPE_SELLER_TO_JUDGE = EnumExpressType.EXPRESS_TYPE_1.getCode(); |
148 | 141 | ||
149 | private static final Integer EXPRESS_TYPE_JUDGE_TO_BUYER = EnumExpressType.EXPRESS_TYPE_2.getCode(); | 142 | private static final Integer EXPRESS_TYPE_JUDGE_TO_BUYER = EnumExpressType.EXPRESS_TYPE_2.getCode(); |
@@ -1606,6 +1599,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -1606,6 +1599,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
1606 | resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus())); | 1599 | resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus())); |
1607 | resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); | 1600 | resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss")); |
1608 | 1601 | ||
1602 | + //检查买家是否是线下店的用户 | ||
1603 | + resp.setInnerBuyerType("0"); | ||
1604 | + OrderConfig config = orderConfigMapper.selectByCode(ORDER_CONFIG_INNER_BUYER_FOR_OFFLINE); | ||
1605 | + if(config!=null&&StringUtils.isNotBlank(config.getContent())&&buyerOrder.getUid()>0){ | ||
1606 | + // | ||
1607 | + List<String> uidList = Splitter.on(",").trimResults().splitToList(config.getContent()); | ||
1608 | + if(uidList.contains(String.valueOf(buyerOrder.getUid()))){ | ||
1609 | + resp.setInnerBuyerType("1"); | ||
1610 | + } | ||
1611 | + } | ||
1612 | + | ||
1609 | //卖家物流单号 | 1613 | //卖家物流单号 |
1610 | ExpressRecord sellerExpressRecord = expressRecordMapper.selectByOrderCodeAndType(buyerOrder.getOrderCode(), | 1614 | ExpressRecord sellerExpressRecord = expressRecordMapper.selectByOrderCodeAndType(buyerOrder.getOrderCode(), |
1611 | buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE); | 1615 | buyerOrder.getSellerUid(), EXPRESS_TYPE_SELLER_TO_JUDGE); |
@@ -1726,7 +1730,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | @@ -1726,7 +1730,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { | ||
1726 | 1730 | ||
1727 | LOGGER.info("method getSfWaybillCode Result is {}", data); | 1731 | LOGGER.info("method getSfWaybillCode Result is {}", data); |
1728 | 1732 | ||
1729 | - yhValueOperations.set(getRedisKey(req.getOrderCode()), JSONObject.toJSONString(data), 10, TimeUnit.HOURS);//10个小时 | 1733 | + yhValueOperations.set(getRedisKey(req.getOrderCode()), JSONObject.toJSONString(data), 168, TimeUnit.HOURS); //7天 |
1730 | 1734 | ||
1731 | return data; | 1735 | return data; |
1732 | } | 1736 | } |
@@ -39,6 +39,7 @@ public class BrandServiceImpl implements IBrandService { | @@ -39,6 +39,7 @@ public class BrandServiceImpl implements IBrandService { | ||
39 | brand.setEditTime(DateUtil.currentTimeSeconds()); | 39 | brand.setEditTime(DateUtil.currentTimeSeconds()); |
40 | brand.setEditPid(getUserId()); | 40 | brand.setEditPid(getUserId()); |
41 | brand.setBrandLogo(ImagesHelper.getImageRelativeUrl(brand.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); | 41 | brand.setBrandLogo(ImagesHelper.getImageRelativeUrl(brand.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); |
42 | + brand.setSearchShowImage(ImagesHelper.getImageRelativeUrl(brand.getSearchShowImage(), ImagesConstant.BUCKET_SEARCH_SHOW_IMAGE)); | ||
42 | if (brand.getId() == null || brand.getId() == 0) { | 43 | if (brand.getId() == null || brand.getId() == 0) { |
43 | // 默认开启状态 | 44 | // 默认开启状态 |
44 | brand.setStatus(1); | 45 | brand.setStatus(1); |
@@ -68,6 +69,7 @@ public class BrandServiceImpl implements IBrandService { | @@ -68,6 +69,7 @@ public class BrandServiceImpl implements IBrandService { | ||
68 | responseBo = OrikaUtils.map(brand1, BrandResponseBo.class); | 69 | responseBo = OrikaUtils.map(brand1, BrandResponseBo.class); |
69 | responseBo.setCreateTime(DateUtil.getDateStrBySecond(brand1.getCreateTime(), DateUtil.DATE_TIME_FORMAT)); | 70 | responseBo.setCreateTime(DateUtil.getDateStrBySecond(brand1.getCreateTime(), DateUtil.DATE_TIME_FORMAT)); |
70 | responseBo.setBrandLogo(ImagesHelper.getImageAbsoluteUrl(brand1.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); | 71 | responseBo.setBrandLogo(ImagesHelper.getImageAbsoluteUrl(brand1.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); |
72 | + responseBo.setSearchShowImage(ImagesHelper.getImageAbsoluteUrl(brand1.getSearchShowImage(), ImagesConstant.BUCKET_SEARCH_SHOW_IMAGE)); | ||
71 | brandResponseBos.add(responseBo); | 73 | brandResponseBos.add(responseBo); |
72 | } | 74 | } |
73 | return new PageResponseBO<>(count, brandResponseBos, pageModel.getCurrentPage(), pageModel.getPageSize()); | 75 | return new PageResponseBO<>(count, brandResponseBos, pageModel.getCurrentPage(), pageModel.getPageSize()); |
@@ -81,6 +83,7 @@ public class BrandServiceImpl implements IBrandService { | @@ -81,6 +83,7 @@ public class BrandServiceImpl implements IBrandService { | ||
81 | BrandResponseBo brandResponseBo = OrikaUtils.map(brand, BrandResponseBo.class); | 83 | BrandResponseBo brandResponseBo = OrikaUtils.map(brand, BrandResponseBo.class); |
82 | brandResponseBo.setCreateTime(DateUtil.getDateStrBySecond(brand.getCreateTime(), DateUtil.DATE_TIME_FORMAT)); | 84 | brandResponseBo.setCreateTime(DateUtil.getDateStrBySecond(brand.getCreateTime(), DateUtil.DATE_TIME_FORMAT)); |
83 | brandResponseBo.setBrandLogo(ImagesHelper.getImageAbsoluteUrl(brand.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); | 85 | brandResponseBo.setBrandLogo(ImagesHelper.getImageAbsoluteUrl(brand.getBrandLogo(), ImagesConstant.BUCKET_BRAND_LOGO)); |
86 | + brandResponseBo.setSearchShowImage(ImagesHelper.getImageAbsoluteUrl(brand.getSearchShowImage(), ImagesConstant.BUCKET_SEARCH_SHOW_IMAGE)); | ||
84 | return brandResponseBo; | 87 | return brandResponseBo; |
85 | } | 88 | } |
86 | 89 |
@@ -49,6 +49,7 @@ datasources: | @@ -49,6 +49,7 @@ datasources: | ||
49 | - com.yoho.order.dal.BusinessLicenseMapper | 49 | - com.yoho.order.dal.BusinessLicenseMapper |
50 | - com.yoho.order.dal.LiveRecordTimeMapper | 50 | - com.yoho.order.dal.LiveRecordTimeMapper |
51 | - com.yoho.order.dal.SignForPackageMapper | 51 | - com.yoho.order.dal.SignForPackageMapper |
52 | + - com.yoho.order.dal.OrderConfigMapper | ||
52 | 53 | ||
53 | ufo_resource: | 54 | ufo_resource: |
54 | servers: | 55 | servers: |
@@ -49,6 +49,7 @@ datasources: | @@ -49,6 +49,7 @@ datasources: | ||
49 | - com.yoho.order.dal.BusinessLicenseMapper | 49 | - com.yoho.order.dal.BusinessLicenseMapper |
50 | - com.yoho.order.dal.LiveRecordTimeMapper | 50 | - com.yoho.order.dal.LiveRecordTimeMapper |
51 | - com.yoho.order.dal.SignForPackageMapper | 51 | - com.yoho.order.dal.SignForPackageMapper |
52 | + - com.yoho.order.dal.OrderConfigMapper | ||
52 | 53 | ||
53 | ufo_resource: | 54 | ufo_resource: |
54 | servers: | 55 | servers: |
@@ -121,6 +121,17 @@ | @@ -121,6 +121,17 @@ | ||
121 | return '<img src="' + value + '" style="width:98px;height:98px"/></a>'; | 121 | return '<img src="' + value + '" style="width:98px;height:98px"/></a>'; |
122 | } | 122 | } |
123 | }, { | 123 | }, { |
124 | + title: "品牌搜索大图", | ||
125 | + field: "searchShowImage", | ||
126 | + width: 80, | ||
127 | + align: "center", | ||
128 | + formatter: function (value) { | ||
129 | + if (value == null || value == '' || value == undefined) { | ||
130 | + return ''; | ||
131 | + } | ||
132 | + return '<img src="' + value + '" style="width:98px;height:98px"/></a>'; | ||
133 | + } | ||
134 | + }, { | ||
124 | title: "品牌名称", | 135 | title: "品牌名称", |
125 | field: "brandName", | 136 | field: "brandName", |
126 | width: 100, | 137 | width: 100, |
@@ -269,8 +280,9 @@ | @@ -269,8 +280,9 @@ | ||
269 | if (!$("#brandEditForm").form("validate")) { | 280 | if (!$("#brandEditForm").form("validate")) { |
270 | return false; | 281 | return false; |
271 | } | 282 | } |
272 | - if ($("#brandEditForm #imageUpload").imageUpload("getValue") == null || $("#brandEditForm #imageUpload").imageUpload("getValue") == "") { | ||
273 | - $.messager.alert("失败", "请上传图片", "error"); | 283 | + const brandLogoUpload = $("#brandEditForm #brandLogoUpload"); |
284 | + if (brandLogoUpload.imageUpload("getValue") == null || brandLogoUpload.imageUpload("getValue") === "") { | ||
285 | + $.messager.alert("失败", "请上传品牌logo", "error"); | ||
274 | return false; | 286 | return false; |
275 | } | 287 | } |
276 | $.messager.progress({ | 288 | $.messager.progress({ |
@@ -19,10 +19,23 @@ | @@ -19,10 +19,23 @@ | ||
19 | <tr style="height: 60px"> | 19 | <tr style="height: 60px"> |
20 | <td width="10%"><span style="color:red">*</span>品牌LOGO</td> | 20 | <td width="10%"><span style="color:red">*</span>品牌LOGO</td> |
21 | <td> | 21 | <td> |
22 | - <div id="imageUpload"> | 22 | + <div id="brandLogoUpload"> |
23 | </div> | 23 | </div> |
24 | </td> | 24 | </td> |
25 | </tr> | 25 | </tr> |
26 | + <tr style="height: 60px"> | ||
27 | + <td width="10%">品牌搜索大图</td> | ||
28 | + <td> | ||
29 | + <div id="searchShowImageUpload"> | ||
30 | + </div> | ||
31 | + </td> | ||
32 | + </tr> | ||
33 | + <tr style="line-height: 0px"> | ||
34 | + <td width="10%"></td> | ||
35 | + <td width="50%"> | ||
36 | + <div style="color: #ab1e1e;margin-top: 0px">*请上传1035*501尺寸图片</div> | ||
37 | + </td> | ||
38 | + </tr> | ||
26 | 39 | ||
27 | <tr class="coupon" style="height: 60px"> | 40 | <tr class="coupon" style="height: 60px"> |
28 | <td width="10%"></span>品牌搜索词</td> | 41 | <td width="10%"></span>品牌搜索词</td> |
@@ -61,7 +74,7 @@ | @@ -61,7 +74,7 @@ | ||
61 | //width: 240 | 74 | //width: 240 |
62 | }); | 75 | }); |
63 | 76 | ||
64 | - $("#brandEditForm #imageUpload").imageUpload({ | 77 | + $("#brandEditForm #brandLogoUpload").imageUpload({ |
65 | width: 171, | 78 | width: 171, |
66 | height: 120, | 79 | height: 120, |
67 | realInputName: "brandLogo", | 80 | realInputName: "brandLogo", |
@@ -91,12 +104,43 @@ | @@ -91,12 +104,43 @@ | ||
91 | } | 104 | } |
92 | }); | 105 | }); |
93 | 106 | ||
107 | + $("#brandEditForm #searchShowImageUpload").imageUpload({ | ||
108 | + width: 171, | ||
109 | + height: 120, | ||
110 | + realInputName: "searchShowImage", | ||
111 | + url: contextPath + '/fileupload/upload', | ||
112 | + queryParams: { | ||
113 | + bucket: "searchShowImage" | ||
114 | + }, | ||
115 | + onBeforeSubmit: function () { | ||
116 | + $.messager.progress({ | ||
117 | + title: "正在执行", | ||
118 | + msg: "正在执行,请稍后...", | ||
119 | + interval: 500, | ||
120 | + text: "" | ||
121 | + }); | ||
122 | + }, | ||
123 | + filterFileName: function (data) { | ||
124 | + if (!data || data.code != 200) { | ||
125 | + $.messager.progress("close"); | ||
126 | + $.messager.alert("错误", data.message); | ||
127 | + return ""; | ||
128 | + } | ||
129 | + return data.data; | ||
130 | + }, | ||
131 | + onLoadSuccess: function (data) { | ||
132 | + $.messager.progress("close"); | ||
133 | + return false; | ||
134 | + } | ||
135 | + }); | ||
136 | + | ||
94 | if (brandId > 0) { | 137 | if (brandId > 0) { |
95 | $.post(contextPath + "/brand/getBrandById", { | 138 | $.post(contextPath + "/brand/getBrandById", { |
96 | id: brandId | 139 | id: brandId |
97 | }, function (data) { | 140 | }, function (data) { |
98 | $("#brandEditForm").form("load", data.data); | 141 | $("#brandEditForm").form("load", data.data); |
99 | - $("#brandEditForm #imageUpload").imageUpload("setValue", data.data.brandLogo); | 142 | + $("#brandEditForm #brandLogoUpload").imageUpload("setValue", data.data.brandLogo); |
143 | + $("#brandEditForm #searchShowImageUpload").imageUpload("setValue", data.data.searchShowImage); | ||
100 | }); | 144 | }); |
101 | } | 145 | } |
102 | }); | 146 | }); |
-
Please register or login to post a comment