fanli/src/main/java/com/yeshi/fanli/controller/client/v1/UserInfoController.java
@@ -1244,7 +1244,7 @@ e.printStackTrace(); } long[] targetUids = new long[] { 3L, 4L }; long[] targetUids = new long[] { 3L, 4L ,5L}; Config config = configService.getConfig(ConfigKeyEnum.extractCodeEmailFrom.getKey()); String[] sts = config.getValue().split(","); String account = sts[0]; fanli/src/main/java/com/yeshi/fanli/controller/client/v2/SearchControllerV2.java
@@ -31,6 +31,7 @@ import com.yeshi.fanli.dto.vip.VIPSearchResult; import com.yeshi.fanli.dto.vip.goods.VIPGoodsInfo; import com.yeshi.fanli.entity.accept.AcceptData; import com.yeshi.fanli.entity.bus.help.AppPageNotification; import com.yeshi.fanli.entity.goods.CommonGoods; import com.yeshi.fanli.entity.jd.JDGoods; import com.yeshi.fanli.entity.system.ConfigKeyEnum; @@ -45,6 +46,7 @@ import com.yeshi.fanli.service.inter.config.BusinessSystemService; import com.yeshi.fanli.service.inter.config.ConfigService; import com.yeshi.fanli.service.inter.config.SuperHotSearchService; import com.yeshi.fanli.service.inter.help.AppPageNotificationService; import com.yeshi.fanli.service.inter.lable.QualityGoodsService; import com.yeshi.fanli.service.inter.lable.TaoKeGoodsService; import com.yeshi.fanli.service.inter.order.OrderHongBaoMoneyComputeService; @@ -150,6 +152,9 @@ @Resource private OrderHongBaoMoneyComputeService orderHongBaoMoneyComputeService; @Resource private AppPageNotificationService appPageNotificationService; /** * 粘贴板信息推荐 @@ -433,7 +438,7 @@ */ @RequestMapping(value = "searchGoods") public void searchGoods(AcceptData acceptData, Integer goodsType, String key, Integer page, String filter, Integer order, Long uid, HttpSession session, PrintWriter out) { Integer order, Long uid, String notifyType, HttpSession session, PrintWriter out) { if (goodsType == null || goodsType < 1 || goodsType > 5) { out.print(JsonUtil.loadFalseResult(1, "请传递正确平台参数")); @@ -492,33 +497,48 @@ out.print(JsonUtil.loadTrueResult(data)); return; } AppPageNotification ap = null; if (page == 1) { ap = appPageNotificationService.getValidNotificationByTypeCache(notifyType, acceptData.getPlatform(), Integer.parseInt(acceptData.getVersion())); // 没有通知 if (ap == null || !ap.getShow()) { ap = null; } // else {// 有通知 // Gson gson = new // GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); // out.print(JsonUtil.loadTrueResult(gson.toJson(ap))); // } } /*--------- 京东商品 -------*/ if (goodsType.intValue() == Constant.SOURCE_TYPE_JD) { searchJDGoods(acceptData, searchkey, page, filter, order, out); searchJDGoods(acceptData, searchkey, page, filter, order, ap, out); return; } /*-------- 拼多多商品 -------*/ if (goodsType.intValue() == Constant.SOURCE_TYPE_PDD) { searchPDDGoods(acceptData, searchkey, page, filter, order, out); searchPDDGoods(acceptData, searchkey, page, filter, order, ap, out); return; } /*-------- 唯品会商品 ------*/ if (goodsType.intValue() == Constant.SOURCE_TYPE_VIP) { searchVIPGoods(acceptData, searchkey, page, filter, order, out); searchVIPGoods(acceptData, searchkey, page, filter, order, ap, out); return; } /*-------- 苏宁商品 ------*/ if (goodsType.intValue() == Constant.SOURCE_TYPE_SUNING) { searchSuningGoods(acceptData, searchkey, page, filter, order, out); searchSuningGoods(acceptData, searchkey, page, filter, order, ap, out); return; } /*-------- 淘宝商品 -------*/ searchTaoBaoGoods(acceptData, searchkey, page, filter, order, out); searchTaoBaoGoods(acceptData, searchkey, page, filter, order, ap, out); } @@ -534,7 +554,7 @@ * @return */ private void searchTaoBaoGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { AppPageNotification ap, PrintWriter out) { SearchFilter sf = new SearchFilter(); sf.setKey(SearchFilterUtil.filterSearchContent(key)); sf.setPage(page); @@ -664,7 +684,15 @@ } } out.print(JsonUtil.loadTrueResult(data)); out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap))); } private JSONObject buildSearchResult(JSONObject data, AppPageNotification ap) { if (ap != null && data != null) { Gson gson = new GsonBuilder().excludeFieldsWithoutExposeAnnotation().create(); data.put("notification", gson.toJson(ap)); } return data; } /** @@ -679,7 +707,7 @@ * @return */ private void searchJDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { AppPageNotification ap, PrintWriter out) { JDSearchResult result = null; boolean hasCoupon = false; @@ -840,7 +868,7 @@ data.put("result", array); data.put("count", count); out.print(JsonUtil.loadTrueResult(data)); out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap))); } /** @@ -855,7 +883,7 @@ * @return */ private void searchPDDGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { AppPageNotification ap, PrintWriter out) { PDDSearchFilter pddfilter = new PDDSearchFilter(); pddfilter.setKw(SearchFilterUtil.filterSearchContent(key)); pddfilter.setPage(page); @@ -917,7 +945,7 @@ data.put("result", array); data.put("count", count); out.print(JsonUtil.loadTrueResult(data)); out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap))); } /** @@ -934,7 +962,7 @@ * @throws */ private void searchVIPGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { AppPageNotification ap, PrintWriter out) { VIPSearchFilter searchFilter = new VIPSearchFilter(); searchFilter.setKeyword(key); searchFilter.setPage(page); @@ -995,7 +1023,7 @@ data.put("result", array); data.put("count", count); out.print(JsonUtil.loadTrueResult(data)); out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap))); } /** @@ -1012,7 +1040,7 @@ * @throws */ private void searchSuningGoods(AcceptData acceptData, String key, Integer page, String filter, Integer order, PrintWriter out) { AppPageNotification ap, PrintWriter out) { SuningQueryModel searchFilter = new SuningQueryModel(); searchFilter.setKeyword(key); searchFilter.setPageIndex(page); @@ -1075,15 +1103,15 @@ List<SuningGoodsInfo> list = SuningApiUtil.searchGoodsOld(searchFilter); if (list != null && list.size() > 0) { List<String> listId = new ArrayList<>(); for (SuningGoodsInfo goodsInfo: list) { SuningCommodityInfo info = goodsInfo.getCommodityInfo(); if (info != null) { listId.add(info.getCommodityCode() + "-" + info.getSupplierCode()); } for (SuningGoodsInfo goodsInfo : list) { SuningCommodityInfo info = goodsInfo.getCommodityInfo(); if (info != null) { listId.add(info.getCommodityCode() + "-" + info.getSupplierCode()); } } resultList = SuningApiUtil.getGoodsDetailList(listId); } if (resultList != null) { Gson gson = JsonUtil.getApiCommonGson(); if (resultList != null && resultList.size() > 0) { @@ -1099,7 +1127,7 @@ data.put("result", array); data.put("count", 1000); out.print(JsonUtil.loadTrueResult(data)); out.print(JsonUtil.loadTrueResult(buildSearchResult(data, ap))); } } fanli/src/main/java/com/yeshi/fanli/dao/mybatis/money/TeamEincomeRecordMapper.java
@@ -16,7 +16,7 @@ TeamEincomeRecord selectByUidAndPreRecieveTimeAndTypeAndSourceType(@Param("uid") Long uid, @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type, @Param("sourceType") int sourceType); @Param("preRecieveTime") Date preRecieveTime, @Param("type") int type, @Param("sourceType") Integer sourceType); fanli/src/main/java/com/yeshi/fanli/dao/mybatis/order/dividents/TeamDividentsRecordMapper.java
@@ -17,6 +17,6 @@ * TeamDividentsRecord 返回类型 * @throws */ TeamDividentsRecord selectByUidAndDayForUpdate(@Param("uid") Long uid, @Param("day")String day); TeamDividentsRecord selectByUidAndDayAndTypeForUpdate(@Param("uid") Long uid, @Param("day")String day,@Param("type")Integer type); } fanli/src/main/java/com/yeshi/fanli/entity/bus/help/AppPageNotification.java
@@ -61,7 +61,12 @@ fastShare2("快捷分享-京东"), fastShare3("快捷分享-拼多多"), goodsDetailVIP("唯品会详情"), goodsDetailSuning("苏宁详情"); goodsDetailSuning("苏宁详情"), searchGoodsResult1("搜索结果-淘宝"), searchGoodsResult2("搜索结果-京东"), searchGoodsResult3("搜索结果-拼多多"), searchGoodsResult4("搜索结果-唯品会"), searchGoodsResult5("搜索结果-苏宁"); private final String desc; fanli/src/main/java/com/yeshi/fanli/mapping/money/TeamEincomeRecordMapper.xml
@@ -108,7 +108,10 @@ select <include refid="Base_Column_List" /> from yeshi_ec_team_income where ti_uid = #{uid} and ti_type=#{type} and ti_pre_recieve_time=#{preRecieveTime} and ti_source_type=#{sourceType} and ti_pre_recieve_time=#{preRecieveTime} <if test="sourceType!=null"> and ti_source_type=#{sourceType} </if> </select> fanli/src/main/java/com/yeshi/fanli/mapping/order/dividents/TeamDividentsRecordMapper.xml
@@ -22,12 +22,15 @@ from yeshi_ec_team_dividents_record where td_id = #{id,jdbcType=BIGINT} </select> <select id="selectByUidAndDayForUpdate" resultMap="BaseResultMap"> <select id="selectByUidAndDayAndTypeForUpdate" resultMap="BaseResultMap"> select <include refid="Base_Column_List" /> from yeshi_ec_team_dividents_record where td_uid = #{uid} and td_day=#{day} for update td_day=#{day} AND td_type=#{type} for update </select> <delete id="deleteByPrimaryKey" parameterType="java.lang.Long">delete from yeshi_ec_team_dividents_record where td_id = #{id,jdbcType=BIGINT}</delete> <insert id="insert" fanli/src/main/java/com/yeshi/fanli/service/impl/order/dividents/TeamDividentsRecordServiceImpl.java
@@ -28,12 +28,11 @@ throw new ParamsException(1, "参数不完整"); // 判断是否存在 TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayForUpdate(record.getUid(), record.getDay()); TeamDividentsRecord old = teamDividentsRecordMapper.selectByUidAndDayAndTypeForUpdate(record.getUid(), record.getDay(),record.getType()); if (old != null) throw new TeamDividentsRecordException(TeamDividentsRecordException.CODE_EXIST, "记录已存在"); // 加入记录 if (record.getCreateTime() == null) record.setCreateTime(new Date()); teamDividentsRecordMapper.insertSelective(record); fanli/src/main/java/com/yeshi/fanli/service/manger/order/TeamDividentsManager.java
@@ -125,7 +125,7 @@ String key = its.next(); Long uid = Long.parseLong(key.split("#")[0]); Integer type = Integer.parseInt(key.split("#")[1]); BigDecimal dividents = moneyMap.get(uid).setScale(2, BigDecimal.ROUND_DOWN); BigDecimal dividents = moneyMap.get(key).setScale(2, BigDecimal.ROUND_DOWN); // 将资金分配到参与分红的用户 TeamDividentsSourceUser teamDividentsSourceUser = new TeamDividentsSourceUser(); teamDividentsSourceUser.setDay(day); @@ -198,7 +198,6 @@ @Transactional(rollbackFor = Exception.class) public void addToTeamEincome(Long uid, Date preSendTime) throws TeamDividentsRecordException, TeamDividentsDebtException, UserMoneyDetailException, ParamsException, TeamEincomeRecordException { addToTeamEincome(uid, preSendTime, TeamDividentsSourceOrderUserMap.TYPE_MORE_THAN_2); addToTeamEincome(uid, preSendTime, TeamDividentsSourceOrderUserMap.TYPE_TEAM_DIVIDENTS); } fanli/src/main/java/com/yeshi/fanli/util/dataoke/DaTaoKeApiUtil.java
@@ -700,7 +700,7 @@ * @throws */ public static String convertLink(Long auctionId, String pid) { TaoKeAppInfo app = APP_KEYS[1]; TaoKeAppInfo app = APP_KEYS[0]; Map<String, String> params = new TreeMap<>(); params.put("version", "v1.1.1"); params.put("goodsId", auctionId + ""); fanli/src/main/java/com/yeshi/fanli/util/suning/SuningApiUtil.java
@@ -182,6 +182,12 @@ String result = baseRequest("suning.netalliance.commoditydetail.query", key, model); System.out.println(result); JSONObject resultJSON = JSONObject.fromObject(result); if( resultJSON.optJSONObject("sn_responseContent")==null) return null; if(resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body")==null) return null; JSONArray array = resultJSON.optJSONObject("sn_responseContent").optJSONObject("sn_body").optJSONArray(key); if (array != null && array.size() > 0) { return new Gson().fromJson(array.optJSONObject(0).toString(), SuningGoodsInfo.class); fanli/src/main/resource/env-dev/mongo.properties
@@ -1,13 +1,13 @@ mongo.dbname=flq mongo.port=27016 mongo.port=27017 #开发环境 #mongo.host=192.168.1.253 #mongo.username=admin #mongo.password=123456 mongo.host=192.168.1.253 mongo.username=admin mongo.password=123456 # mongo.host=193.112.35.168 mongo.username=yeshi mongo.password=Yeshi2016@ #mongo.host=193.112.35.168 #mongo.username=yeshi #mongo.password=Yeshi2016@ mongo.connectionsPerHost=8 mongo.threadsAllowedToBlockForConnectionMultiplier=4 fanli/src/main/resource/env-dev/rocketmq.xml
@@ -2,8 +2,10 @@ <beans xmlns="http://www.springframework.org/schema/beans" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd"> <!-- <import resource="classpath:/rocket/consumer.xml" /> <import resource="classpath:/rocket/system-coupon-consumer.xml"/> --> <import resource="classpath:/rocket/producer.xml" /> <import resource="classpath:/rocket/transactionProducer.xml" /> </beans> fanli/src/main/resource/env-pro/mongo.properties
@@ -7,11 +7,11 @@ mongo.password=Yeshi2016@ mongo.connectionsPerHost=8 mongo.threadsAllowedToBlockForConnectionMultiplier=4 mongo.connectTimeout=1000 mongo.maxWaitTime=1500 mongo.connectTimeout=10000 mongo.maxWaitTime=15000 mongo.autoConnectRetry=true mongo.socketKeepAlive=true mongo.socketTimeout=1500 mongo.socketTimeout=15000 mongo.slaveOk=true mongo.writeNumber=1 mongo.riteTimeout=0 fanli/src/main/resource/rocket/consumer.xml
@@ -190,7 +190,7 @@ <key> <bean class="com.aliyun.openservices.ons.api.bean.Subscription"> <property name="topic" value="TOPIC_ORDER" /> <property name="expression" value="orderStatistic||taoBaoOrderWeiQuan" /> <property name="expression" value="orderStatistic||orderConfirm||taoBaoOrderWeiQuan" /> </bean> </key> </entry>