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

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

sweet

parent 737425f6
...@@ -234,18 +234,18 @@ public class KylinRefundsStatusServiceImpl { ...@@ -234,18 +234,18 @@ public class KylinRefundsStatusServiceImpl {
entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2); entitiesTable.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
entitiesTable.setUpdatedAt(time); entitiesTable.setUpdatedAt(time);
BigDecimal oldRefundPrice = BigDecimal.valueOf(0); // BigDecimal oldRefundPrice = BigDecimal.valueOf(0);
for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) { // for (KylinOrderTicketEntitiesVo item :orderInfo.getEntitiesVoList()) {
if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){ // if(item.getOrderTicketEntitiesId().equalsIgnoreCase(orderEntitiesId)){
oldRefundPrice = item.getRefundPrice(); // oldRefundPrice = item.getRefundPrice();
break; // break;
} // }
} // }
KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew(); KylinOrderTicketEntitiesVo kylinOrderTicketEntitiesVo = KylinOrderTicketEntitiesVo.getNew();
kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2); kylinOrderTicketEntitiesVo.setIsPayment(KylinTableStatusConst.ENTITIES_IS_PAYMENT2);
kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice))); // kylinOrderTicketEntitiesVo.setRefundPrice(oldRefundPrice.add(BigDecimal.valueOf(refundPrice)));
kylinOrderTicketEntitiesVo.setUpdatedAt(strTime); kylinOrderTicketEntitiesVo.setUpdatedAt(strTime);
BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo))); BasicDBObject entitiesObject = new BasicDBObject("$set", JSON.parse(JsonUtils.toJson(kylinOrderTicketEntitiesVo)));
mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne( mongoTemplate.getCollection(KylinOrderTicketEntitiesVo.class.getSimpleName()).updateOne(
......
...@@ -167,7 +167,7 @@ CREATE TABLE `sweet_manual_shop` ...@@ -167,7 +167,7 @@ CREATE TABLE `sweet_manual_shop`
`manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id', `manual_id` varchar(200) NOT NULL DEFAULT '' COMMENT '电子宣传手册id',
`title` varchar(200) NOT NULL DEFAULT '' COMMENT '商家名称', `title` varchar(200) NOT NULL DEFAULT '' COMMENT '商家名称',
`pic_url` 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玩乐', `type` tinyint NOT NULL DEFAULT 1 COMMENT '1吃喝 2玩乐',
`is_recommend` tinyint NOT NULL DEFAULT 1 COMMENT '0不推荐 1推荐', `is_recommend` tinyint NOT NULL DEFAULT 1 COMMENT '0不推荐 1推荐',
`sort` tinyint NOT NULL DEFAULT 0 COMMENT '排序字段 数字越大越靠前', `sort` tinyint NOT NULL DEFAULT 0 COMMENT '排序字段 数字越大越靠前',
...@@ -181,4 +181,4 @@ CREATE TABLE `sweet_manual_shop` ...@@ -181,4 +181,4 @@ CREATE TABLE `sweet_manual_shop`
) ENGINE = InnoDB ) ENGINE = InnoDB
DEFAULT CHARSET = utf8 DEFAULT CHARSET = utf8
COLLATE = utf8_unicode_ci COLLATE = utf8_unicode_ci
ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册商铺表'; ROW_FORMAT = DYNAMIC COMMENT '电子宣传手册商铺表';
\ No newline at end of file
...@@ -36,13 +36,24 @@ public class SweetManualShopController { ...@@ -36,13 +36,24 @@ public class SweetManualShopController {
@ApiOperation("列表") @ApiOperation("列表")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册id", required = true), @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) { public ResponseDto<SweetManualShop> details(@RequestParam String manualShopId) {
return sweetManualShopService.getList(manualId); return sweetManualShopService.details(manualShopId);
} }
@PostMapping("add") @PostMapping("add")
@ApiOperation("添加列表") @ApiOperation("添加")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册iid", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "manualId", value = "手册iid", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
...@@ -63,7 +74,7 @@ public class SweetManualShopController { ...@@ -63,7 +74,7 @@ public class SweetManualShopController {
} }
@PostMapping("change") @PostMapping("change")
@ApiOperation("通知列表") @ApiOperation("修改")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "manualShopId", value = "商铺id", required = true),
@ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true), @ApiImplicitParam(type = "query", dataType = "String", name = "title", value = "标题", required = true),
...@@ -74,12 +85,12 @@ public class SweetManualShopController { ...@@ -74,12 +85,12 @@ public class SweetManualShopController {
@ApiImplicitParam(type = "query", dataType = "Integer", name = "sort", value = "排序", required = true), @ApiImplicitParam(type = "query", dataType = "Integer", name = "sort", value = "排序", required = true),
}) })
public ResponseDto<Boolean> change(@RequestParam String manualShopId, public ResponseDto<Boolean> change(@RequestParam String manualShopId,
@RequestParam String title, @RequestParam String title,
@RequestParam String picUrl, @RequestParam String picUrl,
@RequestParam String describe, @RequestParam String describe,
@RequestParam Integer type, @RequestParam Integer type,
@RequestParam Integer isRecommend, @RequestParam Integer isRecommend,
@RequestParam Integer sort) { @RequestParam Integer sort) {
return sweetManualShopService.change(manualShopId, title, picUrl, describe, type, isRecommend, sort); return sweetManualShopService.change(manualShopId, title, picUrl, describe, type, isRecommend, sort);
} }
......
...@@ -47,7 +47,7 @@ public class SweetManualShop implements Serializable,Cloneable { ...@@ -47,7 +47,7 @@ public class SweetManualShop implements Serializable,Cloneable {
/** /**
* 商家介绍 * 商家介绍
*/ */
private String describe; private String describes;
/** /**
* 1吃喝 2玩乐 * 1吃喝 2玩乐
......
...@@ -16,7 +16,9 @@ import java.util.List; ...@@ -16,7 +16,9 @@ import java.util.List;
*/ */
public interface ISweetManualShopService extends IService<SweetManualShop> { 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); 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 ...@@ -31,9 +31,19 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
private SweetManualShopMapper sweetManualShopMapper; private SweetManualShopMapper sweetManualShopMapper;
@Override @Override
public ResponseDto<List<SweetManualShop>> getList(String manualId) { public ResponseDto<List<SweetManualShop>> getList(String manualId, Integer type) {
try { 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); return ResponseDto.success(data);
} catch (Exception e) { } catch (Exception e) {
return ResponseDto.failure(); return ResponseDto.failure();
...@@ -48,7 +58,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe ...@@ -48,7 +58,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShop.setManualId(manualId); sweetManualShop.setManualId(manualId);
sweetManualShop.setTitle(title); sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl); sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribe(describe); sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type); sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend); sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort); sweetManualShop.setSort(sort);
...@@ -56,6 +66,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe ...@@ -56,6 +66,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
sweetManualShopMapper.insert(sweetManualShop); sweetManualShopMapper.insert(sweetManualShop);
return ResponseDto.success(); return ResponseDto.success();
} catch (Exception e) { } catch (Exception e) {
e.printStackTrace();
return ResponseDto.failure(); return ResponseDto.failure();
} }
} }
...@@ -66,11 +77,11 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe ...@@ -66,11 +77,11 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
SweetManualShop sweetManualShop = SweetManualShop.getNew(); SweetManualShop sweetManualShop = SweetManualShop.getNew();
sweetManualShop.setTitle(title); sweetManualShop.setTitle(title);
sweetManualShop.setPicUrl(picUrl); sweetManualShop.setPicUrl(picUrl);
sweetManualShop.setDescribe(describe); sweetManualShop.setDescribes(describe);
sweetManualShop.setType(type); sweetManualShop.setType(type);
sweetManualShop.setIsRecommend(isRecommend); sweetManualShop.setIsRecommend(isRecommend);
sweetManualShop.setSort(sort); 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(); return ResponseDto.success();
} catch (Exception e) { } catch (Exception e) {
return ResponseDto.failure(); return ResponseDto.failure();
...@@ -82,7 +93,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe ...@@ -82,7 +93,7 @@ public class SweetManualShopServiceImpl extends ServiceImpl<SweetManualShopMappe
try { try {
SweetManualShop sweetManualShop = SweetManualShop.getNew(); SweetManualShop sweetManualShop = SweetManualShop.getNew();
sweetManualShop.setStatus(0); 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(); return ResponseDto.success();
} catch (Exception e) { } catch (Exception e) {
return ResponseDto.failure(); 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