Merge remote-tracking branch 'origin/test' into dev
This commit is contained in:
commit
6c72c85bbf
|
|
@ -13,6 +13,9 @@ import com.sqx.modules.course.dao.CourseDao;
|
|||
import com.sqx.modules.course.dao.CourseDetailsDao;
|
||||
import com.sqx.modules.course.entity.Course;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.cache.annotation.CacheConfig;
|
||||
import org.springframework.cache.annotation.CacheEvict;
|
||||
import org.springframework.cache.annotation.Cacheable;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.text.SimpleDateFormat;
|
||||
|
|
@ -23,6 +26,7 @@ import java.util.List;
|
|||
* banner图
|
||||
*/
|
||||
@Service
|
||||
@CacheConfig(cacheNames = "banner")
|
||||
public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements BannerService {
|
||||
|
||||
@Autowired
|
||||
|
|
@ -34,12 +38,14 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
|||
|
||||
|
||||
@Override
|
||||
@Cacheable(key = "#classify")
|
||||
public List<Banner> selectBannerList(Integer classify) {
|
||||
return bannerDao.selectList(classify);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
@Cacheable(key = "#classify")
|
||||
public List<Banner> selectBannerLists(Integer classify) {
|
||||
return bannerDao.selectLists(classify);
|
||||
}
|
||||
|
|
@ -51,6 +57,7 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "banner", allEntries = true)
|
||||
public int saveBody(String image, String url, Integer sort) {
|
||||
Banner banner = new Banner();
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
|
|
@ -64,6 +71,7 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "banner", allEntries = true)
|
||||
public int insertBanner(Banner banner) {
|
||||
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
||||
Date now = new Date();
|
||||
|
|
@ -89,11 +97,13 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "banner", allEntries = true)
|
||||
public int deleteBannerById(Long id) {
|
||||
return bannerDao.deleteById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "banner", allEntries = true)
|
||||
public Result updateBannerStateById(Long id) {
|
||||
Banner banner = selectBannerById(id);
|
||||
if (banner != null) {
|
||||
|
|
@ -110,6 +120,7 @@ public class BannerServiceImpl extends ServiceImpl<BannerDao, Banner> implements
|
|||
}
|
||||
|
||||
@Override
|
||||
@CacheEvict(cacheNames = "banner", allEntries = true)
|
||||
public int updateBannerById(Banner banner) {
|
||||
return bannerDao.updateById(banner);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
package com.sqx.modules.course.controller.app;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.sqx.common.annotation.Debounce;
|
||||
import com.sqx.common.utils.Result;
|
||||
import com.sqx.modules.app.annotation.Login;
|
||||
import com.sqx.modules.course.service.CourseDetailsService;
|
||||
|
|
@ -42,6 +43,7 @@ public class AppCourseController extends AbstractController {
|
|||
|
||||
@GetMapping("/selectCourseDetailsById")
|
||||
@ApiOperation("根据id查询短剧详情")
|
||||
// @Debounce(interval = 1000, value = "#id,#token")
|
||||
public Result selectCourseDetailsById(Long id, String token, String courseDetailsId) {
|
||||
return courseDetailsService.selectCourseDetailsById(id, token, courseDetailsId);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -91,23 +91,30 @@ public class TempOrdersTask implements ITask {
|
|||
if (payDetails.getState() == 1) {
|
||||
continue;
|
||||
}
|
||||
BaseResp baseResp = WuyouPay.queryOrder(payDetails.getTradeNo(), order.getPayMoney().toString(), "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1 Edg/131.0.0.0");
|
||||
if (baseResp.getCode() == null || baseResp.getCode() != 200) {
|
||||
continue;
|
||||
}
|
||||
if ("SUCCESS".equals(baseResp.getPayStatus())) {
|
||||
if (payDetails.getState() == 1) {
|
||||
try {
|
||||
BaseResp baseResp = WuyouPay.queryOrder(payDetails.getTradeNo(), order.getPayMoney().toString(), "Mozilla/5.0 (iPhone; CPU iPhone OS 16_6 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/16.6 Mobile/15E148 Safari/604.1 Edg/131.0.0.0");
|
||||
logger.info("baseResp:{} ", JSONUtil.toJsonStr(baseResp));
|
||||
if (baseResp.getCode() == null || baseResp.getCode() != 200) {
|
||||
continue;
|
||||
}
|
||||
logger.info("payDetails:{} ", JSONUtil.toJsonStr(payDetails));
|
||||
logger.info("order:{} ", JSONUtil.toJsonStr(order));
|
||||
updateOrderStatus(payDetails, order);
|
||||
}else {
|
||||
order.setStatus(3);
|
||||
payDetails.setState(2);
|
||||
ordersDao.updateById(order);
|
||||
payDetailsDao.updateById(payDetails);
|
||||
if ("SUCCESS".equals(baseResp.getPayStatus())) {
|
||||
if (payDetails.getState() == 1) {
|
||||
continue;
|
||||
}
|
||||
logger.info("payDetails:{} ", JSONUtil.toJsonStr(payDetails));
|
||||
logger.info("order:{} ", JSONUtil.toJsonStr(order));
|
||||
updateOrderStatus(payDetails, order);
|
||||
}else {
|
||||
order.setStatus(3);
|
||||
payDetails.setState(2);
|
||||
ordersDao.updateById(order);
|
||||
payDetailsDao.updateById(payDetails);
|
||||
}
|
||||
}catch (Exception e){
|
||||
e.printStackTrace();
|
||||
logger.error("订单数据处理异常:", e);
|
||||
}
|
||||
|
||||
}
|
||||
logger.info("订单表数据处理完毕");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue