| @@ -0,0 +1,12 @@ | |||
| INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (679, '抖音POI投放', 606, 'Y', NULL, 1, NULL, NULL, 'poiputon', NULL, 0, 679); | |||
| INSERT INTO `mallink`.`mall_permission`(`id`, `name`, `parent_id`, `available`, `permission`, `resource_type`, `module_color`, `module_color_num`, `url`, `icon`, `version_type`, `sort`) VALUES (424, '抖音分账对账统计', 416, 'Y', NULL, 1, NULL, NULL, 'marketingMangage', NULL, 0, 412); | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 424, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 61202, 61501, 61502]' WHERE `id` = 11; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 223, 224, 225, 251, 261, 299, 300, 301, 302, 303, 304, 305, 306, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 424, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 679, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 12; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 226, 227, 251, 261, 409, 410, 411, 416, 424, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 676, 679, 680, 711, 716, 901, 902, 904, 907, 5502, 60201, 61202, 61501, 61502]' WHERE `id` = 13; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 211, 212, 221, 222, 223, 224, 251, 409, 410, 411, 416, 502, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 615, 622, 648, 649, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 61501, 61502]' WHERE `id` = 101; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 4, 5, 6, 50, 105, 110, 201, 205, 202, 210, 211, 212, 221, 222, 223, 224, 251, 261, 409, 410, 411, 416, 424, 504, 505, 506, 507, 511, 512, 521, 522, 523, 591, 592, 595, 601, 602, 605, 606, 610, 612, 615, 622, 647, 650, 676, 679, 680, 711, 901, 902, 904, 907, 5502, 41001, 60202, 61202, 61501, 61502, 71101]' WHERE `id` = 102; | |||
| UPDATE `mallink`.`mall_sale_type` SET `menus` = '[1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 50, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 201, 202, 203, 204, 205, 206, 209, 210, 211, 212, 221, 222, 225, 223, 224, 251, 261, 299, 300, 307, 308, 401, 402, 403, 404, 405, 406, 407, 408, 409, 410, 411, 412, 413, 414, 415, 416, 417, 418, 420, 421, 422, 423, 424, 431, 432, 502, 503, 504, 505, 506, 507, 508, 509, 511, 512, 513, 514, 521, 522, 523, 531, 532, 533, 591, 592, 595, 601, 602, 603, 604, 605, 606, 607, 608, 609, 610, 611, 612, 613, 615, 616, 621, 622, 623, 624, 625, 626, 627, 641, 642, 643, 644, 645, 646, 647, 651, 652, 653, 661, 662, 663, 664, 665, 666, 671, 672, 673, 674, 675, 676, 679, 680, 681, 682, 683, 684, 685, 687, 691, 692, 693, 694, 695, 701, 702, 703, 704, 711, 713, 714, 715, 901, 902, 903, 904, 905, 906, 907, 908, 910, 931, 932, 951, 952, 961, 962, 963, 965, 966, 967, 968, 1001, 1002, 1003, 1004, 1005, 1006, 1007, 1008, 1009, 1010, 1011, 1012, 1013, 1014, 1015, 1016, 1017, 5502, 6610, 6611, 41701, 41702, 60701, 60702, 61201, 61202, 61501, 61502]' WHERE `id` = 103500103610; | |||
| @@ -113,6 +113,7 @@ public class ShiroConfig { | |||
| filterChainDefinitionMap.put("/alipay/notify/**", "anon"); | |||
| filterChainDefinitionMap.put("/ttPay/notify/**", "anon"); | |||
| filterChainDefinitionMap.put("/ttweb/notify/**", "anon"); | |||
| filterChainDefinitionMap.put("/ttgoods/notify/**", "anon"); | |||
| filterChainDefinitionMap.put("/jinmao/notify/**", "anon"); | |||
| @@ -6,9 +6,12 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.TtCouponChannelPoi; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.enums.EnumCouponVersion; | |||
| import com.iformall.service.MailService; | |||
| import com.iformall.service.TtCouponGoodsService; | |||
| import com.iformall.service.WxAppinfoService; | |||
| import com.iformall.service.WxCouponService; | |||
| import com.iformall.utils.DateUtils; | |||
| import org.slf4j.Logger; | |||
| import org.slf4j.LoggerFactory; | |||
| @@ -42,6 +45,9 @@ public class TtGoodsController extends BaseController { | |||
| @Autowired | |||
| private TtCouponGoodsService ttCouponGoodsService; | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| @Autowired | |||
| @Qualifier("openRedisTemplate") | |||
| RedisTemplate<String, String> openRedisTemplate; | |||
| @@ -70,7 +76,7 @@ public class TtGoodsController extends BaseController { | |||
| Map resultMap = new HashMap<>(); | |||
| if(!product_audit_notify.equals(identifyName)){ | |||
| resultMap.put("err_code",1000); | |||
| resultMap.put("err_tips","error"); | |||
| resultMap.put("err_tips","error1"); | |||
| return resultMap; | |||
| } | |||
| try{ | |||
| @@ -78,20 +84,26 @@ public class TtGoodsController extends BaseController { | |||
| String status = (String) parameterMap.get("status"); | |||
| TtCouponChannelPoi couponChannelPoi = ttCouponGoodsService.getCouponChannelBySpuId(product_id.toString()); | |||
| ResultData resultData = ttCouponGoodsService.productDraftGet(couponChannelPoi, couponChannelPoi.getId(), false); | |||
| if(resultData.code == 200){ | |||
| resultMap.put("err_code",0); | |||
| resultMap.put("err_tips","success"); | |||
| }else{ | |||
| resultMap.put("err_code",resultData.code); | |||
| resultMap.put("err_tips",resultData.message); | |||
| if(couponChannelPoi != null){ | |||
| WxCoupon coupon = wxCouponService.getById(couponChannelPoi.getId(), couponChannelPoi.getTenantId()); | |||
| ResultData resultData = ttCouponGoodsService.productDraftGet(coupon, coupon.getCouponId(), true); | |||
| if(resultData.code == 200){ | |||
| resultMap.put("err_code",0); | |||
| resultMap.put("err_tips","success"); | |||
| }else{ | |||
| resultMap.put("err_code",resultData.code); | |||
| resultMap.put("err_tips",resultData.message); | |||
| } | |||
| return resultMap; | |||
| } | |||
| resultMap.put("err_code",1000); | |||
| resultMap.put("err_tips","error2"); | |||
| return resultMap; | |||
| }catch(Exception e){ | |||
| resultMap.put("err_code",1000); | |||
| resultMap.put("err_tips","error"); | |||
| resultMap.put("err_tips","error3"); | |||
| return resultMap; | |||
| } | |||
| @@ -6,6 +6,7 @@ import com.iformall.common.ResultData; | |||
| import com.iformall.controller.base.BaseController; | |||
| import com.iformall.domain.po.TtCouponChannelPoi; | |||
| import com.iformall.domain.po.WxAppinfo; | |||
| import com.iformall.domain.po.WxCoupon; | |||
| import com.iformall.enums.EnumSpuSyncStatus; | |||
| import com.iformall.service.*; | |||
| import com.iformall.utils.DateUtils; | |||
| @@ -47,6 +48,9 @@ public class TtWebController extends BaseController { | |||
| @Qualifier("openRedisTemplate") | |||
| RedisTemplate<String, String> openRedisTemplate; | |||
| @Autowired | |||
| private WxCouponService wxCouponService; | |||
| /** | |||
| * { | |||
| * "event": "verify_webhook", | |||
| @@ -130,16 +134,21 @@ public class TtWebController extends BaseController { | |||
| // } | |||
| // ttCouponGoodsService.handlerTtGoodsAudit(couponChannelPoi); | |||
| ResultData resultData = ttCouponGoodsService.productDraftGet(couponChannelPoi, couponChannelPoi.getId(), false); | |||
| if(resultData.code == 200){ | |||
| resultMap.put("err_code",0); | |||
| resultMap.put("err_tips","success"); | |||
| openRedisTemplate.opsForValue().set(key,"1",16*60, TimeUnit.SECONDS); | |||
| }else{ | |||
| resultMap.put("err_code",resultData.code); | |||
| resultMap.put("err_tips",resultData.message); | |||
| if(couponChannelPoi != null){ | |||
| WxCoupon coupon = wxCouponService.getById(couponChannelPoi.getId(), couponChannelPoi.getTenantId()); | |||
| ResultData resultData = ttCouponGoodsService.productDraftGet(coupon, coupon.getCouponId(), false); | |||
| if(resultData.code == 200){ | |||
| resultMap.put("err_code",0); | |||
| resultMap.put("err_tips","success"); | |||
| }else{ | |||
| resultMap.put("err_code",resultData.code); | |||
| resultMap.put("err_tips",resultData.message); | |||
| } | |||
| return resultMap; | |||
| } | |||
| resultMap.put("err_code",1000); | |||
| resultMap.put("err_tips","error2"); | |||
| return resultMap; | |||
| } | |||
| @@ -18,6 +18,6 @@ public interface TtCouponChannelPoiMapper extends CommonMapper<TtCouponChannelPo | |||
| TtCouponChannelPoi selectById(@Param("tenantId")String tenantId,@Param("id")Long id); | |||
| TtCouponChannelPoi selectBySpuId(@Param("spuId")String spuId); | |||
| TtCouponChannelPoi selectAuditingBySpuId(@Param("spuId")String spuId); | |||
| } | |||
| @@ -440,7 +440,7 @@ public class TtCouponGoodsServiceImpl implements TtCouponGoodsService { | |||
| @Override | |||
| public TtCouponChannelPoi getCouponChannelBySpuId(String spuId) { | |||
| return ttCouponChannelPoiMapper.selectBySpuId(spuId); | |||
| return ttCouponChannelPoiMapper.selectAuditingBySpuId(spuId); | |||
| } | |||
| @Override | |||
| @@ -110,11 +110,12 @@ | |||
| </select> | |||
| <select id="selectBySpuId" resultMap="BaseResultMap"> | |||
| <select id="selectAuditingBySpuId" resultMap="BaseResultMap"> | |||
| select | |||
| <include refid="allColumns"/> | |||
| from tt_coupon_channel_poi | |||
| where `spu_id` = #{spuId} | |||
| and `status` = 0 | |||
| </select> | |||
| <update id="updateBySpuId" parameterType="com.iformall.domain.po.TtCouponChannelPoi"> | |||