商品订单会员商城配置等模块mp改造
This commit is contained in:
@ -10,6 +10,7 @@ import co.yixiang.utils.OrderUtil;
|
||||
import co.yixiang.utils.RedisUtil;
|
||||
import com.alibaba.fastjson.JSON;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import me.chanjar.weixin.common.bean.menu.WxMenu;
|
||||
@ -41,7 +42,7 @@ public class WechatMenuController {
|
||||
@GetMapping(value = "/YxWechatMenu")
|
||||
@PreAuthorize("@el.check('admin','YxWechatMenu_ALL','YxWechatMenu_SELECT')")
|
||||
public ResponseEntity getYxWechatMenus(){
|
||||
return new ResponseEntity(YxWechatMenuService.getById("wechat_menus"),HttpStatus.OK);
|
||||
return new ResponseEntity(YxWechatMenuService.getOne(new QueryWrapper<YxWechatMenu>().eq("key","wechat_menus")),HttpStatus.OK);
|
||||
}
|
||||
|
||||
|
||||
|
@ -19,7 +19,7 @@ import java.io.Serializable;
|
||||
public class YxWechatMenu implements Serializable {
|
||||
|
||||
@Id
|
||||
@Column(name = "key")
|
||||
@TableField(value = "`key`")
|
||||
private String key;
|
||||
|
||||
|
||||
@ -36,4 +36,4 @@ public class YxWechatMenu implements Serializable {
|
||||
public void copy(YxWechatMenu source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ public class YxWechatReply implements Serializable {
|
||||
|
||||
|
||||
/** 关键字 */
|
||||
@Column(name = "key",unique = true,nullable = false)
|
||||
@TableField(value = "`key`")
|
||||
@NotBlank
|
||||
private String key;
|
||||
|
||||
@ -57,4 +57,4 @@ public class YxWechatReply implements Serializable {
|
||||
public void copy(YxWechatReply source){
|
||||
BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -2,6 +2,7 @@ package co.yixiang.mp.service.impl;
|
||||
|
||||
import co.yixiang.mp.domain.YxWechatMenu;
|
||||
import co.yixiang.common.service.impl.BaseServiceImpl;
|
||||
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
||||
import lombok.AllArgsConstructor;
|
||||
import co.yixiang.dozer.service.IGenerator;
|
||||
import com.github.pagehelper.PageHelper;
|
||||
@ -75,7 +76,7 @@ public class YxWechatMenuServiceImpl extends BaseServiceImpl<YxWechatMenuMapper,
|
||||
|
||||
@Override
|
||||
public Boolean isExist(String wechat_menus) {
|
||||
YxWechatMenu yxWechatMenu = this.getById(wechat_menus);
|
||||
YxWechatMenu yxWechatMenu = this.getOne(new QueryWrapper<YxWechatMenu>().eq("key",wechat_menus));
|
||||
if(yxWechatMenu == null){
|
||||
return false;
|
||||
}
|
||||
|
@ -79,7 +79,7 @@ public class YxWechatReplyServiceImpl extends BaseServiceImpl<YxWechatReplyMappe
|
||||
|
||||
@Override
|
||||
public YxWechatReply isExist(String key) {
|
||||
YxWechatReply yxWechatReply = this.getOne(new QueryWrapper<YxWechatReply>().eq("key",key));
|
||||
YxWechatReply yxWechatReply = this.getOne(new QueryWrapper<YxWechatReply>().eq("`key`",key));
|
||||
return yxWechatReply;
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user