bug
This commit is contained in:
@@ -375,7 +375,8 @@ public class BookLabelAndMarketController {
|
|||||||
wrapper.eq(ShopProductToBookLabel::getBookLabelId,labelId);
|
wrapper.eq(ShopProductToBookLabel::getBookLabelId,labelId);
|
||||||
wrapper.leftJoin(ShopProduct.class,ShopProduct::getProductId,ShopProductToBookLabel::getProductId);
|
wrapper.leftJoin(ShopProduct.class,ShopProduct::getProductId,ShopProductToBookLabel::getProductId);
|
||||||
wrapper.selectAll(ShopProduct.class);
|
wrapper.selectAll(ShopProduct.class);
|
||||||
wrapper.orderByAsc(ShopProductToBookLabel::getSort);
|
// wrapper.orderByAsc(ShopProductToBookLabel::getSort);
|
||||||
|
wrapper.orderByDesc(ShopProduct::getSumSales);
|
||||||
List list = toLabelService.listMaps(wrapper);
|
List list = toLabelService.listMaps(wrapper);
|
||||||
return R.ok().put("result", list);
|
return R.ok().put("result", list);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -247,7 +247,8 @@ public class BuyOrderController {
|
|||||||
totalPrice = totalPrice.add(getShoppingAmount(buyOrder));
|
totalPrice = totalPrice.add(getShoppingAmount(buyOrder));
|
||||||
|
|
||||||
//减去积分抵扣
|
//减去积分抵扣
|
||||||
totalPrice = totalPrice.subtract(buyOrder.getJfDeduction());
|
|
||||||
|
totalPrice = totalPrice.subtract(buyOrder.getJfDeduction()==null?BigDecimal.ZERO:buyOrder.getJfDeduction());
|
||||||
|
|
||||||
String orderSn = IdWorker.getTimeId().substring(0, 32);
|
String orderSn = IdWorker.getTimeId().substring(0, 32);
|
||||||
buyOrder.setOrderSn(orderSn);
|
buyOrder.setOrderSn(orderSn);
|
||||||
@@ -293,7 +294,7 @@ public class BuyOrderController {
|
|||||||
recordTransaction(buyOrder, user, totalPrice);
|
recordTransaction(buyOrder, user, totalPrice);
|
||||||
}
|
}
|
||||||
//记录用户积分消费情况
|
//记录用户积分消费情况
|
||||||
if(buyOrder.getJfDeduction().compareTo(BigDecimal.ZERO) > 0){
|
if(buyOrder.getJfDeduction()!=null&&buyOrder.getJfDeduction().compareTo(BigDecimal.ZERO) > 0){
|
||||||
recordJfTransaction(buyOrder, user, buyOrder.getJfDeduction());
|
recordJfTransaction(buyOrder, user, buyOrder.getJfDeduction());
|
||||||
}
|
}
|
||||||
//消费用户积分并记录用户积分消费记录
|
//消费用户积分并记录用户积分消费记录
|
||||||
@@ -874,6 +875,9 @@ public class BuyOrderController {
|
|||||||
|
|
||||||
|
|
||||||
private boolean useJfCoin(MyUserEntity user,BigDecimal jf){
|
private boolean useJfCoin(MyUserEntity user,BigDecimal jf){
|
||||||
|
if(jf==null){
|
||||||
|
return true;
|
||||||
|
}
|
||||||
if(user.getJf().compareTo(jf)>=0){
|
if(user.getJf().compareTo(jf)>=0){
|
||||||
user.setJf(user.getJf().subtract(jf));
|
user.setJf(user.getJf().subtract(jf));
|
||||||
this.myUserService.updateById(user);
|
this.myUserService.updateById(user);
|
||||||
|
|||||||
@@ -50,7 +50,7 @@ public class CourseMedicineMarketController {
|
|||||||
@RequestMapping("/addSociologyMarket")
|
@RequestMapping("/addSociologyMarket")
|
||||||
public R addSociologyMarket(@RequestBody CourseMedicineMarketEntity courseMedicineMarketEntity){
|
public R addSociologyMarket(@RequestBody CourseMedicineMarketEntity courseMedicineMarketEntity){
|
||||||
marketService.save(courseMedicineMarketEntity);
|
marketService.save(courseMedicineMarketEntity);
|
||||||
return R.ok().put("market",courseMedicineMarketEntity);
|
return R.ok().put("result",courseMedicineMarketEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("/editSociologyMarket")
|
@RequestMapping("/editSociologyMarket")
|
||||||
@@ -70,7 +70,7 @@ public class CourseMedicineMarketController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
marketService.updateById(courseMedicineMarketEntity);
|
marketService.updateById(courseMedicineMarketEntity);
|
||||||
return R.ok().put("market",courseMedicineMarketEntity);
|
return R.ok().put("result",courseMedicineMarketEntity);
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping(path = "/delMarket")
|
@RequestMapping(path = "/delMarket")
|
||||||
@@ -105,6 +105,14 @@ public class CourseMedicineMarketController {
|
|||||||
return R.ok().put("list",courseByMarketId);
|
return R.ok().put("list",courseByMarketId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/editMarketSort")
|
||||||
|
public R editMarketSort(@RequestBody Map<String,Integer> map){
|
||||||
|
CourseToMedicineMarketEntity info = toMarketService.getOne(new LambdaQueryWrapper<CourseToMedicineMarketEntity>().eq(CourseToMedicineMarketEntity::getCourseId, map.get("courseId")).eq(CourseToMedicineMarketEntity::getMedicineMarketId, map.get("marketId")),false);
|
||||||
|
info.setSort(map.get("sort"));
|
||||||
|
toMarketService.updateById(info);
|
||||||
|
return R.ok().put("result",info);
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取未关联课程列表
|
* 获取未关联课程列表
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -97,6 +97,16 @@ public class CourseSociologyMarketController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@RequestMapping("/editMarketSort")
|
||||||
|
public R editMarketSort(@RequestBody Map<String,Integer> map){
|
||||||
|
CourseToSociologyMarketEntity info = toMarketService.getOne(new LambdaQueryWrapper<CourseToSociologyMarketEntity>()
|
||||||
|
.eq(CourseToSociologyMarketEntity::getSociologyMarketId, map.get("marketId"))
|
||||||
|
.eq(CourseToSociologyMarketEntity::getCourseId, map.get("courseId")), false);
|
||||||
|
info.setSort(map.get("sort"));
|
||||||
|
toMarketService.updateById(info);
|
||||||
|
return R.ok().put("result",info);
|
||||||
|
}
|
||||||
|
|
||||||
@RequestMapping("/getCourseListByMarketId")
|
@RequestMapping("/getCourseListByMarketId")
|
||||||
public R getCourseListByMarketId(@RequestBody Map<String,Integer> map){
|
public R getCourseListByMarketId(@RequestBody Map<String,Integer> map){
|
||||||
List<CourseEntity> marketId = toMarketService.getCourseListByMarketId(map.get("marketId"));
|
List<CourseEntity> marketId = toMarketService.getCourseListByMarketId(map.get("marketId"));
|
||||||
|
|||||||
@@ -53,7 +53,7 @@ public class CourseController {
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 获取营销标签下的课程列表
|
* 获取国学营销标签下的课程列表
|
||||||
* @param param
|
* @param param
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -77,8 +77,8 @@ public class CourseServiceImpl extends ServiceImpl<CourseDao, CourseEntity> impl
|
|||||||
public Page<CourseEntity> getMarketCourseList(ParamTo param) {
|
public Page<CourseEntity> getMarketCourseList(ParamTo param) {
|
||||||
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
|
MPJLambdaWrapper<CourseEntity> wrapper = new MPJLambdaWrapper<>();
|
||||||
wrapper.selectAll(CourseEntity.class);
|
wrapper.selectAll(CourseEntity.class);
|
||||||
wrapper.leftJoin(CourseToMedicineMarketEntity.class, CourseToMedicineMarketEntity::getCourseId,CourseEntity::getId);
|
wrapper.leftJoin(CourseToSociologyMarketEntity.class, CourseToSociologyMarketEntity::getCourseId,CourseEntity::getId);
|
||||||
wrapper.eq(CourseToMedicineMarketEntity::getMedicineMarketId,param.getId());
|
wrapper.eq(CourseToSociologyMarketEntity::getSociologyMarketId,param.getId());
|
||||||
wrapper.orderByAsc(CourseToSociologyEntity::getSort);
|
wrapper.orderByAsc(CourseToSociologyEntity::getSort);
|
||||||
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()), CourseEntity.class, wrapper);
|
Page<CourseEntity> courseEntityPage = this.getBaseMapper().selectJoinPage(new Page<>(param.getPage(), param.getLimit()), CourseEntity.class, wrapper);
|
||||||
return courseEntityPage;
|
return courseEntityPage;
|
||||||
|
|||||||
Reference in New Issue
Block a user