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

Commit 2c6bc603 authored by jiangxiulong's avatar jiangxiulong

Merge remote-tracking branch 'origin/dev' into dev

parents 7f60e133 ab9c4433
package com.liquidnet.service.base.codec.aspect; package com.liquidnet.service.base.codec.aspect;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.liquidnet.common.exception.constant.ErrorCode;
import com.liquidnet.commons.lang.util.JsonUtils; import com.liquidnet.commons.lang.util.JsonUtils;
import com.liquidnet.service.base.codec.annotation.DecryptAndVerify; import com.liquidnet.service.base.codec.annotation.DecryptAndVerify;
import com.liquidnet.service.base.codec.exception.DecryptAndVerifyException; import com.liquidnet.service.base.codec.exception.DecryptAndVerifyException;
...@@ -31,7 +32,7 @@ public class DecryptAndVerifyAspect { ...@@ -31,7 +32,7 @@ public class DecryptAndVerifyAspect {
public Object around(ProceedingJoinPoint joinPoint) throws Throwable { public Object around(ProceedingJoinPoint joinPoint) throws Throwable {
Object[] args = joinPoint.getArgs(); Object[] args = joinPoint.getArgs();
if (args == null || args.length == 0) { if (args == null || args.length == 0) {
throw new DecryptAndVerifyException(joinPoint.getSignature().getName() + ",参数为空"); throw new DecryptAndVerifyException(ErrorCode.HTTP_PARAM_ERROR.getCode(),joinPoint.getSignature().getName() + ",参数为空");
} }
EncryptedReq encryptedReq = null; EncryptedReq encryptedReq = null;
for (Object obj : args) { for (Object obj : args) {
...@@ -41,7 +42,7 @@ public class DecryptAndVerifyAspect { ...@@ -41,7 +42,7 @@ public class DecryptAndVerifyAspect {
} }
} }
if (encryptedReq == null) { if (encryptedReq == null) {
throw new DecryptAndVerifyException(joinPoint.getSignature().getName() + ",参数中无待解密类"); throw new DecryptAndVerifyException(ErrorCode.HTTP_PARAM_ERROR.getCode(),joinPoint.getSignature().getName() + ",参数中无待解密类");
} }
log.info("DecryptAndVerifyAspect 解密前 下单request:{}", JsonUtils.toJson(encryptedReq)); log.info("DecryptAndVerifyAspect 解密前 下单request:{}", JsonUtils.toJson(encryptedReq));
String decryptedData = decryptAndVerify(encryptedReq); String decryptedData = decryptAndVerify(encryptedReq);
...@@ -49,7 +50,7 @@ public class DecryptAndVerifyAspect { ...@@ -49,7 +50,7 @@ public class DecryptAndVerifyAspect {
MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature(); MethodSignature methodSignature = (MethodSignature) joinPoint.getSignature();
DecryptAndVerify annotation = methodSignature.getMethod().getAnnotation(DecryptAndVerify.class); DecryptAndVerify annotation = methodSignature.getMethod().getAnnotation(DecryptAndVerify.class);
if (annotation == null || annotation.decryptedClass() == null) { if (annotation == null || annotation.decryptedClass() == null) {
throw new DecryptAndVerifyException(joinPoint.getSignature().getName() + ",未指定解密类型"); throw new DecryptAndVerifyException(ErrorCode.HTTP_PARAM_ERROR.getCode(),joinPoint.getSignature().getName() + ",未指定解密类型");
} }
encryptedReq.setData(JSON.parseObject(decryptedData, annotation.decryptedClass())); encryptedReq.setData(JSON.parseObject(decryptedData, annotation.decryptedClass()));
return joinPoint.proceed(); return joinPoint.proceed();
...@@ -60,7 +61,7 @@ public class DecryptAndVerifyAspect { ...@@ -60,7 +61,7 @@ public class DecryptAndVerifyAspect {
if (sign.equals(encryptedReq.getSign())) { if (sign.equals(encryptedReq.getSign())) {
return CodecUtil.aesDecrypt(encryptedReq.getEncryptedData()); return CodecUtil.aesDecrypt(encryptedReq.getEncryptedData());
} else { } else {
throw new DecryptAndVerifyException("验签失败:" + JSON.toJSONString(encryptedReq)); throw new DecryptAndVerifyException(ErrorCode.HTTP_PARAM_ERROR.getCode(),"验签失败:");
} }
} }
} }
package com.liquidnet.service.base.codec.exception; package com.liquidnet.service.base.codec.exception;
import com.liquidnet.common.exception.LiquidnetServiceException;
/** /**
* @description: 解密验证异常 * @description: 解密验证异常
* @author: DFY * @author: DFY
* @time: 2020/3/30 13:58 * @time: 2020/3/30 13:58
*/ */
public class DecryptAndVerifyException extends RuntimeException { public class DecryptAndVerifyException extends LiquidnetServiceException {
public DecryptAndVerifyException(String message) { public DecryptAndVerifyException(String code,String message) {
super(message); super(code,message);
} }
} }
...@@ -87,9 +87,11 @@ public class AdamEntersController { ...@@ -87,9 +87,11 @@ public class AdamEntersController {
List<AdamEntersVo> vos = adamRdmService.getEntersVoByUid(CurrentUtil.getCurrentUid()); List<AdamEntersVo> vos = adamRdmService.getEntersVoByUid(CurrentUtil.getCurrentUid());
Optional<AdamEntersVo> any = vos.stream().filter(r -> (r.getIdCard().equals(parameter.getIdCard())) && r.getType().equals(parameter.getType())).findAny(); if (!CollectionUtils.isEmpty(vos)) {
if (any.isPresent()) { Optional<AdamEntersVo> any = vos.stream().filter(r -> (r.getIdCard().equals(parameter.getIdCard())) && r.getType().equals(parameter.getType())).findAny();
return ResponseDto.failure(ErrorMapping.get("10019")); if (any.isPresent()) {
return ResponseDto.failure(ErrorMapping.get("10019"));
}
} }
String entersId = adamEntersService.add(parameter); String entersId = adamEntersService.add(parameter);
......
...@@ -525,7 +525,7 @@ public class AdamRdmService { ...@@ -525,7 +525,7 @@ public class AdamRdmService {
redisUtil.del(AdamRedisConst.INFO_MEMBER_CODE.concat(memberCode)); redisUtil.del(AdamRedisConst.INFO_MEMBER_CODE.concat(memberCode));
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <AdamMemberCodeVo::buyOrderNo, MEMBER_CODE + STATE> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | <AdamMemberCodeVo::buyOrderNo, MEMBER_CODE> */
public boolean setMemberCodeByBuyOrderNo(String buyOrderNo, String memberCode) { public boolean setMemberCodeByBuyOrderNo(String buyOrderNo, String memberCode) {
return redisUtil.set(buyOrderNo, memberCode); return redisUtil.set(buyOrderNo, memberCode);
...@@ -549,7 +549,10 @@ public class AdamRdmService { ...@@ -549,7 +549,10 @@ public class AdamRdmService {
// ); // );
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s); // log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
// return vo; // return vo;
return this.getMemberCodeVoByCode(this.getMemberCodeByBuyOrderNo(buyOrderNo)); // TODO: 2021/7/30 存在购买会员兑换码功能时,按需调整
AdamMemberCodeVo vo = AdamMemberCodeVo.getNew();
vo.setCode(this.getMemberCodeByBuyOrderNo(buyOrderNo));
return vo;
} }
/* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | TAGS:List<AdamTagVo> */ /* - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | TAGS:List<AdamTagVo> */
......
...@@ -51,7 +51,7 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService { ...@@ -51,7 +51,7 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
AdamAddressesVo vo = AdamAddressesVo.getNew(); AdamAddressesVo vo = AdamAddressesVo.getNew();
BeanUtils.copyProperties(parameter, vo); BeanUtils.copyProperties(parameter, vo);
vo.setAddressesId(String.valueOf(IDGenerator.nextSnowId())); vo.setAddressesId(IDGenerator.nextSnowId());
vo.setUid(currentUid); vo.setUid(currentUid);
vo.setIsDefault(CollectionUtils.isEmpty(vos)); vo.setIsDefault(CollectionUtils.isEmpty(vos));
vo.setState(1); vo.setState(1);
...@@ -62,7 +62,9 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService { ...@@ -62,7 +62,9 @@ public class AdamAddressesServiceImpl implements IAdamAddressesService {
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s); // log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
long s = System.currentTimeMillis(); long s = System.currentTimeMillis();
adamRdmService.delAddressesVoByUid(currentUid); // adamRdmService.delAddressesVoByUid(currentUid);
vos.add(vo);
adamRdmService.setAddressesVoByUid(currentUid, vos);
log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s); log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s);
s = System.currentTimeMillis(); s = System.currentTimeMillis();
......
...@@ -56,6 +56,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService { ...@@ -56,6 +56,8 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
if (1 == parameter.getType()) { if (1 == parameter.getType()) {
if (!adamRdmService.isCertification(1, parameter.getIdCard(), parameter.getName())) { if (!adamRdmService.isCertification(1, parameter.getIdCard(), parameter.getName())) {
identityHandler(currentUid, parameter.getName(), parameter.getIdCard()); identityHandler(currentUid, parameter.getName(), parameter.getIdCard());
adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName());
} }
} }
...@@ -64,7 +66,7 @@ public class AdamEntersServiceImpl implements IAdamEntersService { ...@@ -64,7 +66,7 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
AdamEntersVo vo = AdamEntersVo.getNew(); AdamEntersVo vo = AdamEntersVo.getNew();
BeanUtils.copyProperties(parameter, vo); BeanUtils.copyProperties(parameter, vo);
vo.setEntersId(String.valueOf(IDGenerator.nextSnowId())); vo.setEntersId(IDGenerator.nextSnowId());
vo.setUid(currentUid); vo.setUid(currentUid);
vo.setIsDefault(CollectionUtils.isEmpty(vos)); vo.setIsDefault(CollectionUtils.isEmpty(vos));
vo.setState(1); vo.setState(1);
...@@ -75,10 +77,9 @@ public class AdamEntersServiceImpl implements IAdamEntersService { ...@@ -75,10 +77,9 @@ public class AdamEntersServiceImpl implements IAdamEntersService {
// log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s); // log.debug("#MDB耗时:{}ms", System.currentTimeMillis() - s);
long s = System.currentTimeMillis(); long s = System.currentTimeMillis();
adamRdmService.delEntersVoByUid(currentUid); // adamRdmService.delEntersVoByUid(currentUid);
if (1 == parameter.getType()) { vos.add(vo);
adamRdmService.setCertification(1, parameter.getIdCard(), parameter.getName()); adamRdmService.setEntersVoByUid(currentUid, vos);
}
log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s); log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s);
s = System.currentTimeMillis(); s = System.currentTimeMillis();
......
...@@ -404,6 +404,7 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -404,6 +404,7 @@ public class AdamUserServiceImpl implements IAdamUserService {
ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10102"); ErrorMapping.ErrorMessage errorMessage = ErrorMapping.get("10102");
throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage()); throw new LiquidnetServiceException(errorMessage.getCode(), errorMessage.getMessage());
} }
adamRdmService.setCertification(1, idCard, name);
} }
AdamRealName realName = new AdamRealName(); AdamRealName realName = new AdamRealName();
...@@ -425,7 +426,6 @@ public class AdamUserServiceImpl implements IAdamUserService { ...@@ -425,7 +426,6 @@ public class AdamUserServiceImpl implements IAdamUserService {
long s = System.currentTimeMillis(); long s = System.currentTimeMillis();
adamRdmService.setRealInfoVoByUid(uid, vo); adamRdmService.setRealInfoVoByUid(uid, vo);
adamRdmService.setCertification(1, idCard, name);
log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s); log.debug("#RDS耗时:{}ms", System.currentTimeMillis() - s);
// } // }
// RedisLockUtil.unlock(AdamRedisConst.LOCK_KEY_UIDENTITY + uid); // RedisLockUtil.unlock(AdamRedisConst.LOCK_KEY_UIDENTITY + uid);
......
...@@ -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);
} }
......
...@@ -41,7 +41,7 @@ public class SweetRichtextController { ...@@ -41,7 +41,7 @@ public class SweetRichtextController {
return sweetRichtextService.get(manualId, type); return sweetRichtextService.get(manualId, type);
} }
@GetMapping("list") @PostMapping("add")
@ApiOperation("添加富文本") @ApiOperation("添加富文本")
@ApiImplicitParams({ @ApiImplicitParams({
@ApiImplicitParam(type = "query", dataType = "Integer", name = "manualId", value = "页数", required = true), @ApiImplicitParam(type = "query", dataType = "Integer", name = "manualId", value = "页数", required = true),
......
...@@ -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();
......
...@@ -39,7 +39,9 @@ ...@@ -39,7 +39,9 @@
<select id="getManualDetails" parameterType="java.util.Map" resultMap="getManualListResult"> <select id="getManualDetails" parameterType="java.util.Map" resultMap="getManualListResult">
select manual_relation_id, select manual_relation_id,
sa.`name`, sa.`name`,
sa.`artists_id`,
ss.title, ss.title,
ss.stage_id,
performance_start, performance_start,
performance_end, performance_end,
signature_start, signature_start,
......
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