diff --git a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
index e3b9094dc..079f10861 100644
--- a/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
+++ b/mallinkService/src/main/java/com/iformall/domain/po/WxMerchant.java
@@ -219,6 +219,8 @@ public class WxMerchant extends TenantEntity {
private String carParams;
@io.swagger.annotations.ApiModelProperty(value="经营业态ID:参照wx_business表",name="businessId")
private Integer businessId;
+ @io.swagger.annotations.ApiModelProperty(value="经营业态ID:参照wx_business表",name="businessTypes")
+ private String businessTypes;
@io.swagger.annotations.ApiModelProperty(value="子业态",name="subBusinessId")
private Integer subBusinessId;
@io.swagger.annotations.ApiModelProperty(value="店铺类型:1直营店2加盟店3个体店4旗舰店",name="shopType")
diff --git a/mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java b/mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java
index 26a5ae556..e15013bb3 100644
--- a/mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java
+++ b/mallinkService/src/main/java/com/iformall/service/tt/TtCouponService.java
@@ -61,4 +61,7 @@ public interface TtCouponService {
ResultData auditRejected(Long id);
+ int addSeeCount(Long id);
+
+ int addSellCount(Long id);
}
diff --git a/mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java
index 96fb7bff4..d4ddabc2a 100644
--- a/mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/tt/impl/TtCouponServiceImpl.java
@@ -135,7 +135,6 @@ public class TtCouponServiceImpl implements TtCouponService {
// WxMerchant author = wxMerchantMapper.selectById(byId.getMerchantId());
// byId.setMerchantName(author.getName());
// byId.setMerchantPic(author.getImgUrl());
-
byId.setAuthor(wxMerchantMapper.selectById(byId.getMerchantId()));
if(byId.getType().equals(EnumTtCouponType.COUPON_COLUMN.getCode())){
TtCoupon couponQ = new TtCoupon();
@@ -277,4 +276,14 @@ public class TtCouponServiceImpl implements TtCouponService {
ttCouponMapper.updateById(byId);
return new ResultData();
}
+
+ @Override
+ public int addSeeCount(Long id) {
+ return ttCouponMapper.addSeeCount(id);
+ }
+
+ @Override
+ public int addSellCount(Long id) {
+ return ttCouponMapper.addSellCount(id);
+ }
}
diff --git a/mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java b/mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java
index 960352abf..8db727596 100644
--- a/mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java
+++ b/mallinkService/src/main/java/com/iformall/service/tt/impl/TtOrderServiceImpl.java
@@ -114,6 +114,7 @@ public class TtOrderServiceImpl implements TtOrderService {
order.setCreateDate(now);
order.setUpdateDate(now);
ttOrderMapper.insert(order);
+ ttCouponService.addSellCount(coupon.getId());
return new ResultData(order);
} catch (MallinkException e) {
logger.error(e.getMessage());
diff --git a/mallinkService/src/main/java/com/iformall/utils/sign/SignUtils.java b/mallinkService/src/main/java/com/iformall/utils/sign/SignUtils.java
index 2e28061c3..85a9266d8 100644
--- a/mallinkService/src/main/java/com/iformall/utils/sign/SignUtils.java
+++ b/mallinkService/src/main/java/com/iformall/utils/sign/SignUtils.java
@@ -40,7 +40,8 @@ public class SignUtils {
if ("MD5".equals(signMethod)) {
return getMD5(signStr.toString());
} else {
- return getSHA(signStr.toString());
+// return getSHA(signStr.toString());
+ return encrypt(signStr.toString(),signMethod);
}
}
diff --git a/mallinkService/src/main/resources/mapper/TtCouponMapper.xml b/mallinkService/src/main/resources/mapper/TtCouponMapper.xml
index f001e9c32..aab83a68d 100644
--- a/mallinkService/src/main/resources/mapper/TtCouponMapper.xml
+++ b/mallinkService/src/main/resources/mapper/TtCouponMapper.xml
@@ -147,27 +147,27 @@
- update tt_coupon SET see_count = see_count+1, update_date=now() where id = #{id}
+ update tt_coupon SET see_count = see_count+1,popularity = popularity+1, update_date=now() where id = #{id}
- update tt_coupon SET sell_count = sell_count+1, false_sell_count = false_sell_count+1, update_date=now() where id = #{id}
+ update tt_coupon SET sell_count = sell_count+1,popularity = popularity+20, false_sell_count = false_sell_count+1, update_date=now() where id = #{id}
- update tt_coupon SET sell_count = sell_count-1, false_sell_count = false_sell_count-1, update_date=now() where id = #{id}
+ update tt_coupon SET sell_count = sell_count-1,popularity = popularity-20, false_sell_count = false_sell_count-1, update_date=now() where id = #{id}
- update tt_coupon SET assess_count = assess_count+1, update_date=now() where id = #{id}
+ update tt_coupon SET assess_count = assess_count+1,popularity = popularity+10, update_date=now() where id = #{id}
- update tt_coupon SET collect_count = collect_count+1, update_date=now() where id = #{id}
+ update tt_coupon SET collect_count = collect_count+1,popularity = popularity+5, update_date=now() where id = #{id}
- update tt_coupon SET collect_count = collect_count-1, update_date=now() where id = #{id}
+ update tt_coupon SET collect_count = collect_count-1,popularity = popularity-5, update_date=now() where id = #{id}
diff --git a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
index fe2ad70c3..591154c7e 100644
--- a/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
+++ b/mallinkService/src/main/resources/mapper/WxMerchantMapper.xml
@@ -16,6 +16,8 @@
+
+
@@ -43,13 +45,13 @@
`id`,`tenant_id`,`parent_tenant_id`,`img_url`,`name`,`encode`,`link_phone`,`create_date`,`update_date`,`car_vendor_type`,`car_params`,`status`,`link_person`,
- `business_id`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`,
+ `business_id`,`business_types`,`sub_business_id`,`shop_type`,`brand`,`type`,`is_public`,email,`title`,`cover_picture`,`is_admin`,`bill_setting`,`qr_code`,
`introduction`,`action_desc`,`is_del`,`talk_user_main`,`talk_user_aux`,link_line_phone,credit_locked,cash_out_number,cash_out_count,cash_out_last_time
m.`id`,m.`tenant_id`,m.`parent_tenant_id`,m.`img_url`,m.`name`,m.`encode`,m.`link_phone`,m.`create_date`,m.`update_date`,m.`car_vendor_type`,m.`car_params`,m.`status`,m.`link_person`,
- m.`business_id`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`,
+ m.`business_id`,m.`business_types`,m.`sub_business_id`,m.`shop_type`,m.`brand`,m.`type`,m.`is_public`,m.email,m.`title`,m.`cover_picture`,m.`is_admin`,m.`bill_setting`,m.`qr_code`,
m.`introduction`,m.`action_desc`,m.`is_del`,m.`talk_user_main`,m.`talk_user_aux`,m.link_line_phone,r.rental_start_date,r.rental_end_date,m.cash_out_number,m.cash_out_count,m.cash_out_last_time
@@ -99,6 +101,10 @@
and `business_id` = #{businessId}
+
+ and JSON_CONTAINS(business_types,JSON_OBJECT('id', #{businessTypes}))
+
+
and `sub_business_id` = #{subBusinessId}
diff --git a/mallinkTTAdmin/src/main/java/com/iformall/controller/video/VideoController.java b/mallinkTTAdmin/src/main/java/com/iformall/controller/video/VideoController.java
index c4709d51e..4757ec130 100644
--- a/mallinkTTAdmin/src/main/java/com/iformall/controller/video/VideoController.java
+++ b/mallinkTTAdmin/src/main/java/com/iformall/controller/video/VideoController.java
@@ -72,7 +72,7 @@ public class VideoController extends BaseController {
* @throws Exception
*/
@GetMapping(value = "/uploadProgress")
- @ApiOperation("上传视频进度")
+ @ApiOperation("上传视频进度大小")
@ApiImplicitParams({
@ApiImplicitParam(name = "videoId", value = "视频编号", dataType = "String", paramType = "query", required = true)})
public ResultData uploadProgress(String videoId) {
@@ -93,7 +93,7 @@ public class VideoController extends BaseController {
* @throws Exception
*/
@GetMapping(value = "/videoContentLength")
- @ApiOperation("上传视频进度")
+ @ApiOperation("上传视频大小")
@ApiImplicitParams({
@ApiImplicitParam(name = "videoId", value = "视频编号", dataType = "String", paramType = "query", required = true)})
public ResultData videoContentLength(String videoId) {
@@ -114,7 +114,7 @@ public class VideoController extends BaseController {
* @throws Exception
*/
@GetMapping(value = "/videoDetial")
- @ApiOperation("上传视频进度")
+ @ApiOperation("上传视频详情")
@ApiImplicitParams({
@ApiImplicitParam(name = "videoId", value = "视频编号", dataType = "String", paramType = "query", required = true)})
public ResultData videoDetial(String videoId) {
diff --git a/mallinkTTAdmin/src/main/resources/application.yml b/mallinkTTAdmin/src/main/resources/application.yml
index a7e6c2cd1..847ef513f 100644
--- a/mallinkTTAdmin/src/main/resources/application.yml
+++ b/mallinkTTAdmin/src/main/resources/application.yml
@@ -45,7 +45,7 @@ spring:
auto: true
flyway:
locations: classpath:/db/migration
- baseline-on-migrate: true
+ enabled: false
baseline-version: 1
diff --git a/mallinkTTCApi/pom.xml b/mallinkTTCApi/pom.xml
index 8faff80e2..a2b9e7cb7 100644
--- a/mallinkTTCApi/pom.xml
+++ b/mallinkTTCApi/pom.xml
@@ -18,6 +18,12 @@
1.0
+
+ com.iformall
+ mallinkVideo
+ 1.0
+
+
diff --git a/mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java b/mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java
index a6c0887dc..a7dc4526a 100644
--- a/mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java
+++ b/mallinkTTCApi/src/main/java/com/iformall/controller/TtCouponController.java
@@ -8,6 +8,8 @@ import com.iformall.enums.EnumTtCouponStatus;
import com.iformall.exception.MallinkException;
import com.iformall.service.WxMerchantService;
import com.iformall.service.tt.TtCouponService;
+import com.iformall.video.VideoFactory;
+import com.iformall.video.entity.VideUploadResult;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
@@ -30,6 +32,12 @@ public class TtCouponController extends BaseController {
@Autowired
private WxMerchantService wxMerchantService;
+ @Autowired
+ private VideoFactory videoFactory;
+
+ @Autowired
+ String videoType;
+
@ApiOperation("分页列表接口")
@GetMapping("list")
@ApiImplicitParams({
@@ -50,9 +58,25 @@ public class TtCouponController extends BaseController {
if (id == null) {
return new ResultData(ResultData.ERROR, "缺少id");
}
+ ttCouponService.addSeeCount(id);
return new ResultData(ttCouponService.detail(id));
}
+ @GetMapping(value = "/videoDetial")
+ @ApiOperation("上传视频详情")
+ @ApiImplicitParams({
+ @ApiImplicitParam(name = "videoId", value = "视频编号", dataType = "String", paramType = "query", required = true)})
+ public ResultData videoDetial(String videoId) {
+ try {
+ VideUploadResult videoDetail = videoFactory.getExcutor(videoType).getVideoDetail(videoId);
+ return new ResultData(videoDetail);
+ } catch (Exception e) {
+ logger.error(e.getMessage());
+ return new ResultData(ErrorCode.PICTURE_ANALYZING_ERROR);
+ }
+ }
+
+
@ApiOperation("是否收藏")
@GetMapping("/iscollect")
@ApiImplicitParam(name = "id", value = "id", dataType = "Long", paramType = "query", required = true)
diff --git a/mallinkTTCApi/src/main/resources/application-dev.yml b/mallinkTTCApi/src/main/resources/application-dev.yml
index 57aab4bda..a8c52d340 100644
--- a/mallinkTTCApi/src/main/resources/application-dev.yml
+++ b/mallinkTTCApi/src/main/resources/application-dev.yml
@@ -160,10 +160,15 @@ alipay:
callback: https://callbacktest.malls.iformall.com/api/alipay/notify/callback
video:
- aliyun:
- accessKeyId: LTAI4G7ixY4AhvM35F8o3W3V
- accessKeySecret: VfWqGb83qIQrS9us45utskl8itd7ry
- regionId: cn-beijing
+ aliyun:
+ accessKeyId: LTAI4G7ixY4AhvM35F8o3W3V
+ accessKeySecret: VfWqGb83qIQrS9us45utskl8itd7ry
+ regionId: cn-beijing
+ endPoint: https://oss-cn-beijing.aliyuncs.com
+ corePoolSize: 6
+ maxPoolSize: 20
+ queueCapacity: 1000
+ namePrefix: aliyun-video-upload
jasypt:
encryptor:
diff --git a/mallinkTTCApi/src/main/resources/application-prod.yml b/mallinkTTCApi/src/main/resources/application-prod.yml
index 46faa5409..63cd997db 100644
--- a/mallinkTTCApi/src/main/resources/application-prod.yml
+++ b/mallinkTTCApi/src/main/resources/application-prod.yml
@@ -119,10 +119,15 @@ alipay:
callback: https://callbacktest.malls.iformall.com/api/alipay/notify/callback
video:
- aliyun:
- accessKeyId: LTAI4G7ixY4AhvM35F8o3W3V
- accessKeySecret: VfWqGb83qIQrS9us45utskl8itd7ry
- regionId: cn-beijing
+ aliyun:
+ accessKeyId: LTAI4G7ixY4AhvM35F8o3W3V
+ accessKeySecret: VfWqGb83qIQrS9us45utskl8itd7ry
+ regionId: cn-beijing
+ endPoint: https://oss-cn-beijing.aliyuncs.com
+ corePoolSize: 6
+ maxPoolSize: 20
+ queueCapacity: 1000
+ namePrefix: aliyun-video-upload
fm:
exception: true