记得上下班打卡 | git大法好,push需谨慎

Commit 67c20ab9 authored by 胡佳晨's avatar 胡佳晨

sweet

parent 737425f6
......@@ -234,18 +234,18 @@ public class KylinRefundsStatusServiceImpl {
entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
entitiesTable.setUpdatedAt(time);
BigDecimal oldRefundPrice = BigDecimal.valueOf(0);
for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) {
if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){
oldRefundPrice = item.getRefundPrice();
break;
}
}
// BigDecimal oldRefundPrice = BigDecimal.valueOf(0);
// for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) {
// if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){
// oldRefundPrice = item.getRefundPrice();
// break;
// }
// }
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew();
kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice)));
// kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice)));
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
......
......@@ -167,7 +167,7 @@ CREATE TABLE `sweet_manual_shop`
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '商家名称',
`pic_url` varchar(200) NOT NULL DEFAULT '' COMMENT '商家图片',
`describe` longtext NULL COMMENT '商家介绍',
`describes` longtext NULL COMMENT '商家介绍',
`type` tinyint NOT NULL DEFAULT 1 COMMENT '1吃喝 2玩乐',
`is_recommend` tinyint NOT NULL DEFAULT 1 COMMENT '0不推荐 1推荐',
`sort` tinyint NOT NULL DEFAULT 0 COMMENT '排序字段 数字越大越靠前',
......
......@@ -36,13 +36,24 @@ public class SweetManualShopController {
@ApiOperation("列表")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true),
@ApiImplicitParam(type = "query", dataType = "Integer", name = "type", value = "类型 1吃喝 2玩乐", required = true),
})
public ResponseDto<List<SweetManualShop>> getList(@RequestParam String manualId,
@RequestParam Integer type) {
return sweetManualShopService.getList(manualId, type);
}
@GetMapping("details")
@ApiOperation("详情")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
})
public ResponseDto<List<SweetManualShop>> getList(@RequestParam() String manualId) {
return sweetManualShopService.getList(manualId);
public ResponseDto<SweetManualShop> details(@RequestParam String manualShopId) {
return sweetManualShopService.details(manualShopId);
}
@PostMapping("add")
@ApiOperation("添加列表")
@ApiOperation("添加")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册iid", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
......@@ -63,7 +74,7 @@ public class SweetManualShopController {
}
@PostMapping("change")
@ApiOperation("通知列表")
@ApiOperation("修改")
@ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
......
......@@ -47,7 +47,7 @@ public class SweetManualShop implements Serializable,Cloneable {
/**
* 商家介绍
*/
private String describe;
private String describes;
/**
* 1吃喝 2玩乐
......
......@@ -16,7 +16,9 @@ import java.util.List;
*/
public interface ISweetManualShopService extends IService<SweetManualShop> {
ResponseDto<List<SweetManualShop>> getList(String manualId);
ResponseDto<List<SweetManualShop>> getList(String manualId,Integer type);
ResponseDto<SweetManualShop> details(String manualShopId);
ResponseDto<Boolean> add(String manualId,String title,String picUrl,String describe,Integer type,Integer isRecommend,Integer sort);
......
......@@ -31,9 +31,19 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
private SweetManualShopMapper sweetManualShopMapper;
@Override
public ResponseDto<List<SweetManualShop>> getList(String manualId) {
public ResponseDto<List<SweetManualShop>> getList(String manualId, Integer type) {
try {
List<SweetManualShop> data = sweetManualShopMapper.selectList(Wrappers.lambdaQuery(SweetManualShop.class).eq(SweetManualShop::getManualId, manualId).eq(SweetManualShop::getStatus, 1));
List<SweetManualShop> data = sweetManualShopMapper.selectList(Wrappers.lambdaQuery(SweetManualShop.class).eq(SweetManualShop::getManualId, manualId).eq(SweetManualShop::getType, type).eq(SweetManualShop::getStatus, 1));
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
}
}
@Override
public ResponseDto<SweetManualShop> details(String manualShopId) {
try {
SweetManualShop data = sweetManualShopMapper.selectOne(Wrappers.lambdaQuery(SweetManualShop.class).eq(SweetManualShop::getManualShopId, manualShopId).eq(SweetManualShop::getStatus, 1));
return ResponseDto.success(data);
} catch (Exception e) {
return ResponseDto.failure();
......@@ -48,7 +58,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShop.setManualId(manualId);
sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribe(describe);
sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort);
......@@ -56,6 +66,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShopMapper.insert(sweetManualShop);
return ResponseDto.success();
} catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure();
}
}
......@@ -66,11 +77,11 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
SweetManualShop sweetManualShop = SweetManualShop.getNew();
sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribe(describe);
sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort);
sweetManualShopMapper.update(sweetManualShop,Wrappers.lambdaUpdate(SweetManualShop.class).eq(SweetManualShop::getManualShopId, manualShopId));
sweetManualShopMapper.update(sweetManualShop, Wrappers.lambdaUpdate(SweetManualShop.class).eq(SweetManualShop::getManualShopId, manualShopId));
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
......@@ -82,7 +93,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
try {
SweetManualShop sweetManualShop = SweetManualShop.getNew();
sweetManualShop.setStatus(0);
sweetManualShopMapper.update(sweetManualShop,Wrappers.lambdaUpdate(SweetManualShop.class).eq(SweetManualShop::getManualShopId, manualShopId));
sweetManualShopMapper.update(sweetManualShop, Wrappers.lambdaUpdate(SweetManualShop.class).eq(SweetManualShop::getManualShopId, manualShopId));
return ResponseDto.success();
} catch (Exception e) {
return ResponseDto.failure();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment