ソースを参照

tt

release_toaliyun_real
xhxu 5年前
コミット
c95c8be017
3個のファイルの変更13行の追加3行の削除
  1. +1
    -2
      mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaServiceImpl.java
  2. +7
    -0
      mallinkService/src/main/java/com/iformall/mapper/TtCouponMapper.java
  3. +5
    -1
      mallinkService/src/main/resources/mapper/TtCouponMapper.xml

+ 1
- 2
mallinkService/src/main/java/com/iformall/douyin/miniapp/api/impl/TtMaServiceImpl.java ファイルの表示

@@ -138,8 +138,7 @@ public class TtMaServiceImpl implements TtMaService, RequestHttp<CloseableHttpCl
Map<String, String> params = new HashMap<>(8); Map<String, String> params = new HashMap<>(8);
params.put("appid", config.getAppid()); params.put("appid", config.getAppid());
params.put("secret", config.getSecret()); params.put("secret", config.getSecret());
params.put("js_code", jsCode);
params.put("grant_type", "authorization_code");
params.put("code", jsCode);


String result = get(JSCODE_TO_SESSION_URL, Joiner.on("&").withKeyValueSeparator("=").join(params)); String result = get(JSCODE_TO_SESSION_URL, Joiner.on("&").withKeyValueSeparator("=").join(params));
return WxMaJscode2SessionResult.fromJson(result); return WxMaJscode2SessionResult.fromJson(result);


+ 7
- 0
mallinkService/src/main/java/com/iformall/mapper/TtCouponMapper.java ファイルの表示

@@ -35,4 +35,11 @@ public interface TtCouponMapper extends CommonMapper<TtCoupon, Long> {
*/ */
int reduceSellCount(Long id); int reduceSellCount(Long id);


/**
* 评价数+1
* @param id
* @return
*/
int addAssessCount(Long id);

} }

+ 5
- 1
mallinkService/src/main/resources/mapper/TtCouponMapper.xml ファイルの表示

@@ -134,7 +134,11 @@
</update> </update>


<update id="reduceSellCount" parameterType="Long"> <update id="reduceSellCount" parameterType="Long">
update tt_coupon SET sell_count = 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>

<update id="addAssessCount" parameterType="Long">
update tt_coupon SET assess_count = assess_count+1, update_date=now() where id = #{id}
</update> </update>


</mapper> </mapper>

読み込み中…
キャンセル
保存