提交 508d78cc 作者: xiaowang

优化:接口优化

上级 df18afb2
package com.mmc.pms.common; package com.mmc.pms.common;
/** /**
* @Author small * @Author small @Date 2023/5/15 14:30 @Version 1.0
* @Date 2023/5/15 14:30
* @Version 1.0
*/ */
public enum ResultEnum implements BaseErrorInfoInterface { public enum ResultEnum implements BaseErrorInfoInterface {
// 数据操作错误定义 // 数据操作错误定义
SUCCESS("200", "success"), BODY_NOT_MATCH("400", "请求的数据格式不符!"), SIGNATURE_NOT_MATCH("401", "请求的数字签名不匹配!"), SUCCESS("200", "success"),
NOT_FOUND("404", "未找到该资源!"), INTERNAL_SERVER_ERROR("500", "服务器内部错误!"), SERVER_BUSY("503", "服务器正忙,请稍后再试!"), BODY_NOT_MATCH("400", "请求的数据格式不符!"),
FILE_UPLOAD_ERROR("600", "文件上传有误"), FILE_UPLOAD_NULL_ERROR("601", "上传的文件不能为空"), SIGNATURE_NOT_MATCH("401", "请求的数字签名不匹配!"),
TOKEN_EXPIRED_ERROR("602", "登录信息已过期,请重新登录"), TOKEN_INVALID_ERROR("603", "无效的登录信息"), NOT_FOUND("404", "未找到该资源!"),
VERIFY_CODE_ERROR("604", "验证码错误,请重新输入"), TOKEN_REDIS_ERROR("605", "登录失效"), INTERNAL_SERVER_ERROR("500", "服务器内部错误!"),
AUTH_ACCOUNT_ERROR("606", "当前账号未授权,请先授权"), TOEKN_REPEAT_ERROR("607", "该账号已在其他设备登录,请重新登录"), SERVER_BUSY("503", "服务器正忙,请稍后再试!"),
FILE_UPLOAD_ERROR("600", "文件上传有误"),
FILE_UPLOAD_NULL_ERROR("601", "上传的文件不能为空"),
TOKEN_EXPIRED_ERROR("602", "登录信息已过期,请重新登录"),
TOKEN_INVALID_ERROR("603", "无效的登录信息"),
VERIFY_CODE_ERROR("604", "验证码错误,请重新输入"),
TOKEN_REDIS_ERROR("605", "登录失效"),
AUTH_ACCOUNT_ERROR("606", "当前账号未授权,请先授权"),
TOEKN_REPEAT_ERROR("607", "该账号已在其他设备登录,请重新登录"),
TOKEN_NOT_VALID_ERROR("608", "access_token已失效或access_token不是最新的"), TOKEN_NOT_VALID_ERROR("608", "access_token已失效或access_token不是最新的"),
SCHEDULE_SYS_ERROR("703", "系统定时任务执行错误"), SCHEDULE_SYS_ERROR("703", "系统定时任务执行错误"),
FORM_REPEAT_ERROR("704", "操作次数频繁,请稍后重试"), DATA_VERSION_ERROR("705", "数据写入版本不一致,请稍后重试。"), FORM_REPEAT_ERROR("704", "操作次数频繁,请稍后重试"),
DATA_VERSION_ERROR("705", "数据写入版本不一致,请稍后重试。"),
REQUEST_PARAM_ILLEGAL_ERROR("706", "请求参数非法"), REQUEST_PARAM_ILLEGAL_ERROR("706", "请求参数非法"),
DATA_INSERT_ERROR("707", "数据插入失败"), DATA_INSERT_ERROR("707", "数据插入失败"),
SCORE_RELEASE_ERROR("708", "积分发放失败,请重试或联系管理员!"), SCORE_RELEASE_ERROR("708", "积分发放失败,请重试或联系管理员!"),
...@@ -25,7 +32,8 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -25,7 +32,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
// 业务操作错误定义 // 业务操作错误定义
CUSTOM_ERROR("-1", "自定义业务错误消息"), CUSTOM_ERROR("-1", "自定义业务错误消息"),
FEIGN_ORDER_SERVLET_ERROR("4001", "访问订单服务失败"), FEIGN_USER_SERVLET_ERROR("4002", "访问用户服务失败"), FEIGN_ORDER_SERVLET_ERROR("4001", "访问订单服务失败"),
FEIGN_USER_SERVLET_ERROR("4002", "访问用户服务失败"),
FEIGN_PAY_SERVLET_ERROR("4003", "访问消耗服务失败"), FEIGN_PAY_SERVLET_ERROR("4003", "访问消耗服务失败"),
DISABLE_ACCOUNT_TOKEN_ERROR("4004", "账号信息变更,登录失效"), DISABLE_ACCOUNT_TOKEN_ERROR("4004", "账号信息变更,登录失效"),
FEIGN_OPERATION_SERVLET_ERROR("4005", "访问行业服务失败"), FEIGN_OPERATION_SERVLET_ERROR("4005", "访问行业服务失败"),
...@@ -36,7 +44,8 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -36,7 +44,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
FEIGN_REPOUSER_SERVLET_ERROR("4010", "访问云仓用户服务失败"), FEIGN_REPOUSER_SERVLET_ERROR("4010", "访问云仓用户服务失败"),
FEIGN_WARE_SERVLET_ERROR("4010", "访问云仓商品服务失败"), FEIGN_WARE_SERVLET_ERROR("4010", "访问云仓商品服务失败"),
FEIGN_DEVICE_SERVLET_ERROR("4011", "访问云仓设备服务失败"), FEIGN_DEVICE_SERVLET_ERROR("4011", "访问云仓设备服务失败"),
CENTER_USER_SERVLET_ERROR("4012", "访问用户中心服务失败"), GATEWAY_HYSRIX_ERROR("4013", "服务器貌似在开小差~"), CENTER_USER_SERVLET_ERROR("4012", "访问用户中心服务失败"),
GATEWAY_HYSRIX_ERROR("4013", "服务器貌似在开小差~"),
FEIGN_FLYER_PAY_SERVLET_ERROR("4014", "访问飞手消耗服务失败"), FEIGN_FLYER_PAY_SERVLET_ERROR("4014", "访问飞手消耗服务失败"),
MALL_USER_SERVLET_ERROR("4015", "访问机城用户服务失败"), MALL_USER_SERVLET_ERROR("4015", "访问机城用户服务失败"),
PRIMARY_KEY_DEFECT("5001", "主键ID缺失"), PRIMARY_KEY_DEFECT("5001", "主键ID缺失"),
...@@ -173,11 +182,13 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -173,11 +182,13 @@ public enum ResultEnum implements BaseErrorInfoInterface {
OAUTH_CREATE_TOKEN_ERROR("6408", "系统内部错误,获取accessToken失败,"), OAUTH_CREATE_TOKEN_ERROR("6408", "系统内部错误,获取accessToken失败,"),
PWD_CREATE_ERROR("6001", "创建密码失败"), PWD_CREATE_ERROR("6001", "创建密码失败"),
PWD_CONPARED_ERROR("6002", "密码错误"), PWD_ALERT_ERROR("6003", "密码不一致"), PWD_CONPARED_ERROR("6002", "密码错误"),
PWD_ALERT_ERROR("6003", "密码不一致"),
PWD_REQUEST_AUTH_ERROR("6003", "密码请求验证"), PWD_REQUEST_AUTH_ERROR("6003", "密码请求验证"),
APPLET_PORT_TYPE_ERROR("7001", "小程序端口类型错误"), APPLET_PORT_TYPE_ERROR("7001", "小程序端口类型错误"),
APPLET_GET_OPENID_ERROR("7002", "获取小程序openid失败"), APPLET_GET_OPENID_ERROR("7002", "获取小程序openid失败"),
UPDATE_USER_ACCOUNT_REPEAT("7003", "修改后的账户名已存在"), ADD_USER_ACCOUNT_NAME_EXISTS("7004", "新增账户名已经存在"), UPDATE_USER_ACCOUNT_REPEAT("7003", "修改后的账户名已存在"),
ADD_USER_ACCOUNT_NAME_EXISTS("7004", "新增账户名已经存在"),
ACCOUNT_NOT_FIND_ERROR("8000", "账号信息不存在"), ACCOUNT_NOT_FIND_ERROR("8000", "账号信息不存在"),
REPEAT_SOFT_DELETE("8001", "账号已删除"), REPEAT_SOFT_DELETE("8001", "账号已删除"),
ADMIN_ROLE_DELETE_ERROR("8002", "此账号为管理员账号,禁止删除"), ADMIN_ROLE_DELETE_ERROR("8002", "此账号为管理员账号,禁止删除"),
...@@ -186,7 +197,8 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -186,7 +197,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
ROLE_AVL_USER_DELETE_ERROR("8005", "此角色尚有可用账号,请将所有账号移除后在进行操作"), ROLE_AVL_USER_DELETE_ERROR("8005", "此角色尚有可用账号,请将所有账号移除后在进行操作"),
ROLE_AVL_USER_STATUS_ERROR("8006", "此角色尚有可用账号,请将所有账号禁用后在进行操作"), ROLE_AVL_USER_STATUS_ERROR("8006", "此角色尚有可用账号,请将所有账号禁用后在进行操作"),
ROLE_SYSTEM_DELETE_ERROR("8007", "此角色为系统角色,禁止删除"), ROLE_SYSTEM_DELETE_ERROR("8007", "此角色为系统角色,禁止删除"),
ADMIN_ROLE_POWER_ERROR("8008", "禁止修改管理类角色权限"), SYSTEM_ROLE_POWER_ERROR("8009", "禁止修改系统类角色权限"), ADMIN_ROLE_POWER_ERROR("8008", "禁止修改管理类角色权限"),
SYSTEM_ROLE_POWER_ERROR("8009", "禁止修改系统类角色权限"),
ROLE_SELF_POWER_ERROR("8010", "禁止修改与当前登录账号角色相同的角色权限"), ROLE_SELF_POWER_ERROR("8010", "禁止修改与当前登录账号角色相同的角色权限"),
ADMIN_ACCOUNT_DISABLE_ERROR("8011", "此账号为管理员账号,禁用失败"), ADMIN_ACCOUNT_DISABLE_ERROR("8011", "此账号为管理员账号,禁用失败"),
...@@ -212,7 +224,6 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -212,7 +224,6 @@ public enum ResultEnum implements BaseErrorInfoInterface {
SORT_PARAMETER_ERROR("28199", "排序参数错误"), SORT_PARAMETER_ERROR("28199", "排序参数错误"),
OPRATING_FREQUENCY_TOO_HIGH("28449", "更新频率过快,请重试"), OPRATING_FREQUENCY_TOO_HIGH("28449", "更新频率过快,请重试"),
INSERT_INDUSTRY_INSPECTION_SUCCESS("20011", "添加对应服务成功"), INSERT_INDUSTRY_INSPECTION_SUCCESS("20011", "添加对应服务成功"),
INSERT_INSPECTION_INDUSTRY_SUCCESS("20012", "添加对应行业成功"), INSERT_INSPECTION_INDUSTRY_SUCCESS("20012", "添加对应行业成功"),
DELETE_INDUSTRY_INSPECTION_SUCCESS("20013", "删除对应服务成功"), DELETE_INDUSTRY_INSPECTION_SUCCESS("20013", "删除对应服务成功"),
...@@ -249,8 +260,7 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -249,8 +260,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
GET_ORDER_LIST_ERROR("22002", "获取订单列表失败"), GET_ORDER_LIST_ERROR("22002", "获取订单列表失败"),
COMMANT_CAR_NAME_EXIST("22003", "指挥车名字已存在,请重新输入"), COMMANT_CAR_NAME_EXIST("22003", "指挥车名字已存在,请重新输入"),
// 认证提示
//认证提示
APP_CODE_ERROR("30301", "appcode 错误"), APP_CODE_ERROR("30301", "appcode 错误"),
REQUE_ENVIROMENT_ERROR("30302", "请求的 Method、Path 或者环境错误"), REQUE_ENVIROMENT_ERROR("30302", "请求的 Method、Path 或者环境错误"),
REQUEST_PARAMETER_ERROR("30303", "请求参数错误"), REQUEST_PARAMETER_ERROR("30303", "请求参数错误"),
...@@ -275,7 +285,7 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -275,7 +285,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
REAL_NAME_ACCOUNT_ID_ERROR("36771", "账户id错误"), REAL_NAME_ACCOUNT_ID_ERROR("36771", "账户id错误"),
REAL_NAME_FUSING_ERROR("36772", "认证失败,请重新认证"), REAL_NAME_FUSING_ERROR("36772", "认证失败,请重新认证"),
//企业认证 // 企业认证
BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("30400", "营业执照解析失败,请上传有效清晰的执照"), BUSINESS_LICENSE_CHECK_ANALYSIS_ERROR("30400", "营业执照解析失败,请上传有效清晰的执照"),
BUSINESS_LICENSE_CHECK_PARAMETER_ERROR("30401", "企业信息与营业执照信息不一致,请重新上传"), BUSINESS_LICENSE_CHECK_PARAMETER_ERROR("30401", "企业信息与营业执照信息不一致,请重新上传"),
BANK_ACCOUNT_CHECK1_ERROR("30402", "账号与开户名不符"), BANK_ACCOUNT_CHECK1_ERROR("30402", "账号与开户名不符"),
...@@ -283,7 +293,8 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -283,7 +293,8 @@ public enum ResultEnum implements BaseErrorInfoInterface {
BANK_ACCOUNT_CHECK3_ERROR("30404", "仅支持对公账户验证,不支持个人卡"), BANK_ACCOUNT_CHECK3_ERROR("30404", "仅支持对公账户验证,不支持个人卡"),
BANK_ACCOUNT_CHECK4_ERROR("30405", "企业账号信息有误,请重新输入"), BANK_ACCOUNT_CHECK4_ERROR("30405", "企业账号信息有误,请重新输入"),
BANK_ACCOUNT_CHECK5_ERROR("30406", "24小时之内不能重复申请"), BANK_ACCOUNT_CHECK5_ERROR("30406", "24小时之内不能重复申请"),
BANK_ACCOUNT_CHECK6_ERROR("30407", "很抱歉,目前我们的企业认证次数已达上限,如需继续认证请及时联系相关负责人进行处理,联系方式:科比特管理人员,18938853647。"), BANK_ACCOUNT_CHECK6_ERROR(
"30407", "很抱歉,目前我们的企业认证次数已达上限,如需继续认证请及时联系相关负责人进行处理,联系方式:科比特管理人员,18938853647。"),
BANK_ACCOUNT_CHECK7_ERROR("30408", "企业名称与开户名称不一致,请确认一致后再提交认证"), BANK_ACCOUNT_CHECK7_ERROR("30408", "企业名称与开户名称不一致,请确认一致后再提交认证"),
ENTERPRISE_HAVE_VERIFIED("30409", "您输入的企业信息已被其他用户认证,请重新输入"), ENTERPRISE_HAVE_VERIFIED("30409", "您输入的企业信息已被其他用户认证,请重新输入"),
...@@ -298,29 +309,28 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -298,29 +309,28 @@ public enum ResultEnum implements BaseErrorInfoInterface {
NOT_ENT_VERIFY_ERROR("30417", "机构未认证或认证未通过,请先进行机构认证"), NOT_ENT_VERIFY_ERROR("30417", "机构未认证或认证未通过,请先进行机构认证"),
NOT__VERIFY_ERROR("30418", "机构未认证或飞手认证未通过,请先进行认证"), NOT__VERIFY_ERROR("30418", "机构未认证或飞手认证未通过,请先进行认证"),
//渠道认证 // 渠道认证
NOT_ENT_USER("30501", "感谢您有意向成为我们的渠道商,请先完成企业认证。"), NOT_ENT_USER("30501", "感谢您有意向成为我们的渠道商,请先完成企业认证。"),
NEW_NOT_ENT_USER("30502", "此用户未进行企业认证,渠道变更失败!"), NEW_NOT_ENT_USER("30502", "此用户未进行企业认证,渠道变更失败!"),
BEFORE_NOT_CHANNEL_USER("30503", "此用户还不是渠道"), BEFORE_NOT_CHANNEL_USER("30503", "此用户还不是渠道"),
// 飞手端认证
//飞手端认证
NOT_AUTH_FLYER_ERROR("30600", "飞手未认证,请先完成飞手认证"), NOT_AUTH_FLYER_ERROR("30600", "飞手未认证,请先完成飞手认证"),
NOT_HAVE_AUTH_FLYER_ERROR("30601", "没有认证的飞手,暂不可接单"), NOT_HAVE_AUTH_FLYER_ERROR("30601", "没有认证的飞手,暂不可接单"),
//设备型号提醒 // 设备型号提醒
DEVICE_MODEL_REPEAT_ERROR("30700", "产品名称不可重复,请重新输入"), DEVICE_MODEL_REPEAT_ERROR("30700", "产品名称不可重复,请重新输入"),
DEVICE_MODEL_FAILURE_ERROR("30701", "设备添加失败"), DEVICE_MODEL_FAILURE_ERROR("30701", "设备添加失败"),
DEVICE_MODEL_REMOVE_ERROR("30702", "设备未在仓库,删除失败"), DEVICE_MODEL_REMOVE_ERROR("30702", "设备未在仓库,删除失败"),
DEVICE_MODEL_UPDATE_ERROR("30703", "设备修改失败"), DEVICE_MODEL_UPDATE_ERROR("30703", "设备修改失败"),
DEVICE_HAS_BEEN_RENT_ERROR("30704", "该设备不在仓库,不能出库"), DEVICE_HAS_BEEN_RENT_ERROR("30704", "该设备不在仓库,不能出库"),
//仓库提醒 // 仓库提醒
REPO_INFO_NAME("30800", "仓库名称不可重复,请重新输入"), REPO_INFO_NAME("30800", "仓库名称不可重复,请重新输入"),
REPO_INFO_FAILURE("30801", "仓库添加失败"), REPO_INFO_FAILURE("30801", "仓库添加失败"),
REPO_INFO_REMOVE("30702", "仓库删除失败"), REPO_INFO_REMOVE("30702", "仓库删除失败"),
//商品 // 商品
WARE_NAME_HAS_BEEN_EXIST("30900", "商品名称已存在"), WARE_NAME_HAS_BEEN_EXIST("30900", "商品名称已存在"),
WARE_TYPE_NAME_HAS_BEEN_EXIST("30901", "分类名称已存在"), WARE_TYPE_NAME_HAS_BEEN_EXIST("30901", "分类名称已存在"),
WARE_TYPE_ICON_NOT_NULL("30902", "一级分类图标不能为空"), WARE_TYPE_ICON_NOT_NULL("30902", "一级分类图标不能为空"),
...@@ -337,12 +347,12 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -337,12 +347,12 @@ public enum ResultEnum implements BaseErrorInfoInterface {
GOODS_NAME_IS_NOT_NULL("30914", "商品名称不能为空或名字长度不能大于60"), GOODS_NAME_IS_NOT_NULL("30914", "商品名称不能为空或名字长度不能大于60"),
GOODS_DELETE_FAIL("30915", "批量删除商品失败,商品已被其他商品绑定"), GOODS_DELETE_FAIL("30915", "批量删除商品失败,商品已被其他商品绑定"),
BRAND_DELETE_FAIL("30916", "删除失败,产品管理中有产品绑定该品牌名称"), BRAND_DELETE_FAIL("30916", "删除失败,产品管理中有产品绑定该品牌名称"),
//返祖 // 返祖
RETURN_SHARE_ORDER_ERROR("40000", "设备返祖订单相关信息找不到,请重新输入订单号"), RETURN_SHARE_ORDER_ERROR("40000", "设备返祖订单相关信息找不到,请重新输入订单号"),
RETURN_SHARE_ORDER_NOT_FINISH_ERROR("40001", "此设备的订单未完成,请添加其他设备"), RETURN_SHARE_ORDER_NOT_FINISH_ERROR("40001", "此设备的订单未完成,请添加其他设备"),
RETURN_SHARE_ORDER_HAS_BEEN_ADD_ERROR("40002", "此订单的设备已经被添加过,不能重复添加"), RETURN_SHARE_ORDER_HAS_BEEN_ADD_ERROR("40002", "此订单的设备已经被添加过,不能重复添加"),
//宣传中心 // 宣传中心
EXIST_SAME_NAME_OF_MODULE_ERROR("40500", "所属产品中不能有相同名字的模块"), EXIST_SAME_NAME_OF_MODULE_ERROR("40500", "所属产品中不能有相同名字的模块"),
EXIST_SAME_NAME_OF_BANNER_ERROR("40501", "名称重复,请重新输入"), EXIST_SAME_NAME_OF_BANNER_ERROR("40501", "名称重复,请重新输入"),
EXIST_SAME_CODE_OF_MODULE_ERROR("40502", "moduleCode已重复,请输入其他moduleCode"), EXIST_SAME_CODE_OF_MODULE_ERROR("40502", "moduleCode已重复,请输入其他moduleCode"),
...@@ -381,21 +391,23 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -381,21 +391,23 @@ public enum ResultEnum implements BaseErrorInfoInterface {
SCORE_ERROR("40177", "您输入的积分数量有误,请重新输入!"), SCORE_ERROR("40177", "您输入的积分数量有误,请重新输入!"),
PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST("40178", "请先填充合同模板!"), PLEASE_FILL_IN_THE_CONTRACT_TEMPLATE_FIRST("40178", "请先填充合同模板!"),
SCORE_NOT_GIVE_MYSELF("40179","积分不能转赠给本人,请重新操作"), SCORE_NOT_GIVE_MYSELF("40179", "积分不能转赠给本人,请重新操作"),
ALREADY_FINISH_ENT_AUTH_ERROR("2000", "助力已完成!"), ALREADY_FINISH_ENT_AUTH_ERROR("2000", "助力已完成!"),
SYSTEM_ERROR ("2001","系统错误,请稍后重试") , SYSTEM_ERROR("2001", "系统错误,请稍后重试"),
RULE_ERROR ("2002","当前兑换比例已失效,请刷新后重试"), RULE_ERROR("2002", "当前兑换比例已失效,请刷新后重试"),
COUNT_LIMIT_ERROR("2003", "参与次数已达上线"), COUNT_LIMIT_ERROR("2003", "参与次数已达上线"),
ALREADY_ENT_AUTH_ERROR("2004","助力失败,您已完成企业认证!"), ALREADY_ENT_AUTH_ERROR("2004", "助力失败,您已完成企业认证!"),
ALREADY_REAL_NAME_AUTH_ERROR("2005","助力失败,您已完成实名认证!"), ALREADY_REAL_NAME_AUTH_ERROR("2005", "助力失败,您已完成实名认证!"),
PARTICIPATE_BUT_NOT_AUTH_ERROR("2006", "待完成授权或认证"), PARTICIPATE_BUT_NOT_AUTH_ERROR("2006", "待完成授权或认证"),
ALREADY_HELP_ERROR("2007", "已助力"), ALREADY_HELP_ERROR("2007", "已助力"),
ALREADY_STOP_ERROR("2008", "活动已下线"), ALREADY_STOP_ERROR("2008", "活动已下线"),
HELP_FAIL_ERROR("2009", "不能给自己助力哦!"), HELP_FAIL_ERROR("2009", "不能给自己助力哦!"),
ALREADY_BINDING_ERROR("2010", "优惠券已被绑定"), ALREADY_BINDING_ERROR("2010", "优惠券已被绑定"),
ALREADY_DIVIDE_ERROR("2011", "订单已分成"), ALREADY_DIVIDE_ERROR("2011", "订单已分成"),
DIVIDE_OBJ_NOT_EXIST("2012", "先点击确认添加分成对象"); DIVIDE_OBJ_NOT_EXIST("2012", "先点击确认添加分成对象"),
DEFAULT_DIRECTORY("3001", "默认目录不可删除或修改!");
/** /**
* 错误码 * 错误码
* *
......
package com.mmc.pms.controller.common; package com.mmc.pms.controller;
import com.mmc.pms.common.Page; import com.mmc.pms.common.Page;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.constant.TokenConstant; import com.mmc.pms.constant.TokenConstant;
import com.mmc.pms.controller.BaseController;
import com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO; import com.mmc.pms.model.lease.dto.LeaseGoodsInfoDTO;
import com.mmc.pms.model.qo.WareInfoQO; import com.mmc.pms.model.qo.WareInfoQO;
import com.mmc.pms.model.sale.dto.MallGoodsDetailDTO; import com.mmc.pms.model.sale.dto.MallGoodsDetailDTO;
...@@ -23,10 +22,10 @@ import javax.servlet.http.HttpServletRequest; ...@@ -23,10 +22,10 @@ import javax.servlet.http.HttpServletRequest;
* *
* @date 2023/6/8 17:16 概要: * @date 2023/6/8 17:16 概要:
*/ */
@Api(tags = {"v1.0.1-设备租赁-相关接口"}) @Api(tags = {"v1.0.1-租赁销售-相关接口"})
@RestController @RestController
@RequestMapping("/lease/goods") @RequestMapping("/product/mall")
public class LeaseGoodsController extends BaseController { public class ProductMallController extends BaseController {
@Autowired private WebDeviceService webDeviceService; @Autowired private WebDeviceService webDeviceService;
@ApiOperation(value = "设备列表筛选") @ApiOperation(value = "设备列表筛选")
......
package com.mmc.pms.controller.web;
import com.mmc.pms.service.WebDeviceService;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.annotation.Resource;
/**
* @Author LW
* @date 2023/6/8 15:19
* 概要:
*/
@RestController
@RequestMapping("/lease/goods")
@Api(tags = {"web端-设备租赁-相关接口"})
public class WebLeaseGoodsController {
@Resource
WebDeviceService webDeviceService;
}
...@@ -2,6 +2,7 @@ package com.mmc.pms.dao; ...@@ -2,6 +2,7 @@ package com.mmc.pms.dao;
import com.mmc.pms.entity.*; import com.mmc.pms.entity.*;
import com.mmc.pms.model.lease.vo.LeaseVo; import com.mmc.pms.model.lease.vo.LeaseVo;
import com.mmc.pms.model.qo.WareInfoQO;
import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -33,10 +34,15 @@ public interface WebDeviceDao { ...@@ -33,10 +34,15 @@ public interface WebDeviceDao {
List<WareInfoDO> detail(Integer id); List<WareInfoDO> detail(Integer id);
int countListWareInfoPage(@Param("categoryIds") List<Integer> categoryIds, @Param("userIds") List<Integer> userIds); int countListWareInfoPage(
@Param("categoryIds") List<Integer> categoryIds,
@Param("userIds") List<Integer> userIds,
@Param("type") Integer type);
List<GoodsInfo> listWareInfoPage(@Param("categoryIds") List<Integer> categoryIds, @Param("userIds") List<Integer> userId, List<GoodsInfo> listWareInfoPage(
@Param("pageNo") Integer pageNo, @Param("pageSize") Integer pageSize); @Param("param") WareInfoQO param,
@Param("userIds") List<Integer> userId,
@Param("type") Integer type);
WareInfoDO getWareInfoById(Integer id); WareInfoDO getWareInfoById(Integer id);
......
...@@ -17,22 +17,24 @@ import java.util.List; ...@@ -17,22 +17,24 @@ import java.util.List;
@Data @Data
@AllArgsConstructor @AllArgsConstructor
@NoArgsConstructor @NoArgsConstructor
// @ApiModel(value = "com.mmc.csf.model.qo.WareInfoQO", description = "model")
public class WareInfoQO implements Serializable { public class WareInfoQO implements Serializable {
private static final long serialVersionUID = -2953141525621912414L; private static final long serialVersionUID = -2953141525621912414L;
@ApiModelProperty(name = "districtId", value = "地域id", example = "1", required = false) @ApiModelProperty(name = "districtId", value = "地域id", example = "440000")
private Integer provinceId; private Integer provinceId;
@ApiModelProperty(name = "categoryId", value = "分类id") @ApiModelProperty(name = "categoryId", value = "分类id")
private List<Integer> categoryId; private List<Integer> categoryId;
@ApiModelProperty(value = "页码", required = true) @ApiModelProperty(name = "产品类型:0商城 1租赁")
private Integer type;
@ApiModelProperty(value = "页码", required = true, example = "1")
@NotNull(message = "页码不能为空", groups = Page.class) @NotNull(message = "页码不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class) @Min(value = 1, groups = Page.class)
private Integer pageNo; private Integer pageNo;
@ApiModelProperty(value = "每页显示数", required = true) @ApiModelProperty(value = "每页显示数", required = true, example = "10")
@NotNull(message = "每页显示数不能为空", groups = Page.class) @NotNull(message = "每页显示数不能为空", groups = Page.class)
@Min(value = 1, groups = Page.class) @Min(value = 1, groups = Page.class)
private Integer pageSize; private Integer pageSize;
......
...@@ -35,12 +35,9 @@ import java.util.stream.Collectors; ...@@ -35,12 +35,9 @@ import java.util.stream.Collectors;
*/ */
@Service @Service
public class CategoriesServiceImpl implements CategoriesService { public class CategoriesServiceImpl implements CategoriesService {
@Autowired @Autowired private CategoriesDao categoriesDao;
private CategoriesDao categoriesDao; @Resource private GoodsInfoDao goodsInfoDao;
@Resource @Autowired private DirectoryDao directoryDao;
private GoodsInfoDao goodsInfoDao;
@Autowired
private DirectoryDao directoryDao;
@Override @Override
public ResultBody addOrEditDirectory(DirectoryInfoVO param) { public ResultBody addOrEditDirectory(DirectoryInfoVO param) {
...@@ -54,7 +51,7 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -54,7 +51,7 @@ public class CategoriesServiceImpl implements CategoriesService {
} else { } else {
int count = categoriesDao.selectDirectoryById(param.getId()); int count = categoriesDao.selectDirectoryById(param.getId());
if (count > 0) { if (count > 0) {
return ResultBody.error("默认目录不可修改!"); return ResultBody.error(ResultEnum.DEFAULT_DIRECTORY);
} }
categoriesDao.updateDirectory(directory); categoriesDao.updateDirectory(directory);
} }
...@@ -67,8 +64,10 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -67,8 +64,10 @@ public class CategoriesServiceImpl implements CategoriesService {
if (count == 0) { if (count == 0) {
return PageResult.buildPage(pageNo, pageSize, count); return PageResult.buildPage(pageNo, pageSize, count);
} }
List<DirectoryDO> directoryList = categoriesDao.directoryList((pageNo - 1) * pageSize, pageSize, type); List<DirectoryDO> directoryList =
List<DirectoryInfoVO> list = directoryList.stream().map(DirectoryDO::buildDirectoryInfoVO).collect(Collectors.toList()); categoriesDao.directoryList((pageNo - 1) * pageSize, pageSize, type);
List<DirectoryInfoVO> list =
directoryList.stream().map(DirectoryDO::buildDirectoryInfoVO).collect(Collectors.toList());
return PageResult.buildPage(pageNo, pageSize, count, list); return PageResult.buildPage(pageNo, pageSize, count, list);
} }
...@@ -79,6 +78,10 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -79,6 +78,10 @@ public class CategoriesServiceImpl implements CategoriesService {
if (count > 0) { if (count > 0) {
return ResultBody.error(ResultEnum.THERE_ARE_CATEGORIES_IN_THE_DIRECTORY); return ResultBody.error(ResultEnum.THERE_ARE_CATEGORIES_IN_THE_DIRECTORY);
} }
int defaultCount = categoriesDao.selectDirectoryById(id);
if (defaultCount > 0) {
return ResultBody.error(ResultEnum.DEFAULT_DIRECTORY);
}
categoriesDao.removeDirectory(id); categoriesDao.removeDirectory(id);
return ResultBody.success(); return ResultBody.success();
} }
...@@ -142,13 +145,15 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -142,13 +145,15 @@ public class CategoriesServiceImpl implements CategoriesService {
public PageResult getClassificationList(QueryClassifyVO queryClassifyVO) { public PageResult getClassificationList(QueryClassifyVO queryClassifyVO) {
int count = categoriesDao.countListClassification(queryClassifyVO); int count = categoriesDao.countListClassification(queryClassifyVO);
if (count == 0) { if (count == 0) {
return PageResult.buildPage(queryClassifyVO.getPageNo(), queryClassifyVO.getPageSize(), count); return PageResult.buildPage(
queryClassifyVO.getPageNo(), queryClassifyVO.getPageSize(), count);
} }
int pageNo = queryClassifyVO.getPageNo(); int pageNo = queryClassifyVO.getPageNo();
queryClassifyVO.buildCurrentPage(); queryClassifyVO.buildCurrentPage();
List<Categories> categories = categoriesDao.selectAllClassification(queryClassifyVO); List<Categories> categories = categoriesDao.selectAllClassification(queryClassifyVO);
List<ClassifyInfoDTO> categoriesList = categories.stream().map(Categories::buildClassifyInfoDTO).collect(Collectors.toList()); List<ClassifyInfoDTO> categoriesList =
categories.stream().map(Categories::buildClassifyInfoDTO).collect(Collectors.toList());
List<ClassifyInfoDTO> topLevelCategories = new ArrayList<>(); List<ClassifyInfoDTO> topLevelCategories = new ArrayList<>();
Map<Integer, ClassifyInfoDTO> categoriesMap = new HashMap<>(); Map<Integer, ClassifyInfoDTO> categoriesMap = new HashMap<>();
...@@ -173,8 +178,7 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -173,8 +178,7 @@ public class CategoriesServiceImpl implements CategoriesService {
@Override @Override
public ResultBody getClassifyDetails(Integer id) { public ResultBody getClassifyDetails(Integer id) {
Categories goodsGroup = categoriesDao.getGoodsGroupById(id); Categories goodsGroup = categoriesDao.getGoodsGroupById(id);
return ResultBody.success(goodsGroup == null ? null : goodsGroup.buildClassifyDetailsDTO() return ResultBody.success(goodsGroup == null ? null : goodsGroup.buildClassifyDetailsDTO());
);
} }
@Override @Override
...@@ -184,7 +188,10 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -184,7 +188,10 @@ public class CategoriesServiceImpl implements CategoriesService {
case 0: case 0:
List<GoodsInfo> goodsInfo = goodsInfoDao.ListGoodsInfoByCategoryId(id); List<GoodsInfo> goodsInfo = goodsInfoDao.ListGoodsInfoByCategoryId(id);
if (CollectionUtils.isNotEmpty(goodsInfo)) { if (CollectionUtils.isNotEmpty(goodsInfo)) {
relevantBusinessVO.setRelevanceGoodsInfoVOs(goodsInfo.stream().map(GoodsInfo::buildRelevanceGoodsInfoVO).collect(Collectors.toList())); relevantBusinessVO.setRelevanceGoodsInfoVOs(
goodsInfo.stream()
.map(GoodsInfo::buildRelevanceGoodsInfoVO)
.collect(Collectors.toList()));
return ResultBody.success(relevantBusinessVO); return ResultBody.success(relevantBusinessVO);
} }
break; break;
...@@ -197,7 +204,8 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -197,7 +204,8 @@ public class CategoriesServiceImpl implements CategoriesService {
@Override @Override
public ResultBody getDirectoryList(Integer type) { public ResultBody getDirectoryList(Integer type) {
List<DirectoryDO> directoryList = categoriesDao.getDirectoryList(type); List<DirectoryDO> directoryList = categoriesDao.getDirectoryList(type);
List<DirectoryInfoVO> list = directoryList.stream().map(DirectoryDO::buildDirectoryInfoVO).collect(Collectors.toList()); List<DirectoryInfoVO> list =
directoryList.stream().map(DirectoryDO::buildDirectoryInfoVO).collect(Collectors.toList());
return ResultBody.success(list); return ResultBody.success(list);
} }
...@@ -214,7 +222,8 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -214,7 +222,8 @@ public class CategoriesServiceImpl implements CategoriesService {
if (org.springframework.util.CollectionUtils.isEmpty(categories)) { if (org.springframework.util.CollectionUtils.isEmpty(categories)) {
return ResultBody.success(); return ResultBody.success();
} }
List<CategoriesDTO> collect = categories.stream().map(CategoriesDTO::new).collect(Collectors.toList()); List<CategoriesDTO> collect =
categories.stream().map(CategoriesDTO::new).collect(Collectors.toList());
return ResultBody.success(collect); return ResultBody.success(collect);
} }
...@@ -226,7 +235,6 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -226,7 +235,6 @@ public class CategoriesServiceImpl implements CategoriesService {
return categoriesDao.getCategoriesListByIds(ids); return categoriesDao.getCategoriesListByIds(ids);
} }
@Override @Override
public ResultBody deleteRelevantBusiness(Integer id) { public ResultBody deleteRelevantBusiness(Integer id) {
int count = categoriesDao.deleteById(id); int count = categoriesDao.deleteById(id);
...@@ -237,7 +245,8 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -237,7 +245,8 @@ public class CategoriesServiceImpl implements CategoriesService {
public ResultBody queryCategoryInfoByType(Integer type) { public ResultBody queryCategoryInfoByType(Integer type) {
List<DirectoryDO> categoryDirectoryList = getCategoryDirectoryList(type); List<DirectoryDO> categoryDirectoryList = getCategoryDirectoryList(type);
if (CollectionUtils.isNotEmpty(categoryDirectoryList)) { if (CollectionUtils.isNotEmpty(categoryDirectoryList)) {
List<AllCategoryDTO> allCategoryDTOList = categoryDirectoryList.stream() List<AllCategoryDTO> allCategoryDTOList =
categoryDirectoryList.stream()
.map(DirectoryDO::buildAllCategoryDTO) .map(DirectoryDO::buildAllCategoryDTO)
.collect(Collectors.toList()); .collect(Collectors.toList());
Map<Integer, List<CategoriesInfoListDTO>> categoryMap = getCategoryMap(allCategoryDTOList); Map<Integer, List<CategoriesInfoListDTO>> categoryMap = getCategoryMap(allCategoryDTOList);
...@@ -251,8 +260,10 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -251,8 +260,10 @@ public class CategoriesServiceImpl implements CategoriesService {
return categoriesDao.getDirectoryList(type); return categoriesDao.getDirectoryList(type);
} }
private Map<Integer, List<CategoriesInfoListDTO>> getCategoryMap(List<AllCategoryDTO> allCategoryDTOList) { private Map<Integer, List<CategoriesInfoListDTO>> getCategoryMap(
List<Integer> directoryIdIds = allCategoryDTOList.stream() List<AllCategoryDTO> allCategoryDTOList) {
List<Integer> directoryIdIds =
allCategoryDTOList.stream()
.map(AllCategoryDTO::getDirectoryId) .map(AllCategoryDTO::getDirectoryId)
.collect(Collectors.toList()); .collect(Collectors.toList());
List<Categories> categoriesList = categoriesDao.selectCategoryByDirectoryId(directoryIdIds); List<Categories> categoriesList = categoriesDao.selectCategoryByDirectoryId(directoryIdIds);
...@@ -261,7 +272,8 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -261,7 +272,8 @@ public class CategoriesServiceImpl implements CategoriesService {
.collect(Collectors.groupingBy(CategoriesInfoListDTO::getDirectoryId)); .collect(Collectors.groupingBy(CategoriesInfoListDTO::getDirectoryId));
} }
private void addSubCategories(List<AllCategoryDTO> allCategoryDTOList, private void addSubCategories(
List<AllCategoryDTO> allCategoryDTOList,
Map<Integer, List<CategoriesInfoListDTO>> categoryMap) { Map<Integer, List<CategoriesInfoListDTO>> categoryMap) {
for (AllCategoryDTO allCategoryDTO : allCategoryDTOList) { for (AllCategoryDTO allCategoryDTO : allCategoryDTOList) {
Optional.ofNullable(categoryMap.get(allCategoryDTO.getDirectoryId())) Optional.ofNullable(categoryMap.get(allCategoryDTO.getDirectoryId()))
...@@ -269,7 +281,3 @@ public class CategoriesServiceImpl implements CategoriesService { ...@@ -269,7 +281,3 @@ public class CategoriesServiceImpl implements CategoriesService {
} }
} }
} }
...@@ -169,7 +169,7 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -169,7 +169,7 @@ public class WebDeviceServiceImpl implements WebDeviceService {
userIds = Collections.singletonList(-1); userIds = Collections.singletonList(-1);
} }
} }
int count = webDeviceDao.countListWareInfoPage(param.getCategoryId(), userIds); int count = webDeviceDao.countListWareInfoPage(param.getCategoryId(), userIds, param.getType());
if (count == 0) { if (count == 0) {
return ResultBody.success( return ResultBody.success(
PageResult.buildPage(param.getPageNo(), param.getPageSize(), count)); PageResult.buildPage(param.getPageNo(), param.getPageSize(), count));
...@@ -177,9 +177,7 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -177,9 +177,7 @@ public class WebDeviceServiceImpl implements WebDeviceService {
int pageNo = param.getPageNo(); int pageNo = param.getPageNo();
param.buildCurrentPage(); param.buildCurrentPage();
if (request == null) { if (request == null) {
List<GoodsInfo> list = List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType());
webDeviceDao.listWareInfoPage(
param.getCategoryId(), userIds, param.getPageNo(), param.getPageSize());
List<LeaseGoodsInfoDTO> pageList = List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList()); list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList)); return ResultBody.success(PageResult.buildPage(pageNo, param.getPageSize(), count, pageList));
...@@ -190,9 +188,7 @@ public class WebDeviceServiceImpl implements WebDeviceService { ...@@ -190,9 +188,7 @@ public class WebDeviceServiceImpl implements WebDeviceService {
if (userAccountSimpleDTO == null) { if (userAccountSimpleDTO == null) {
return ResultBody.error(ResultEnum.INTERNAL_SERVER_ERROR); return ResultBody.error(ResultEnum.INTERNAL_SERVER_ERROR);
} }
List<GoodsInfo> list = List<GoodsInfo> list = webDeviceDao.listWareInfoPage(param, userIds, param.getType());
webDeviceDao.listWareInfoPage(
param.getCategoryId(), userIds, param.getPageNo(), param.getPageSize());
List<LeaseGoodsInfoDTO> pageList = List<LeaseGoodsInfoDTO> pageList =
list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList()); list.stream().map(GoodsInfo::buildLeaseGoodsInfoDTO).collect(Collectors.toList());
if (userAccountSimpleDTO.getCooperationTagId() == null) { if (userAccountSimpleDTO.getCooperationTagId() == null) {
......
...@@ -3,13 +3,9 @@ package com.mmc.pms.service.Impl; ...@@ -3,13 +3,9 @@ package com.mmc.pms.service.Impl;
import com.mmc.pms.common.ResultBody; import com.mmc.pms.common.ResultBody;
import com.mmc.pms.dao.WebProductMallDao; import com.mmc.pms.dao.WebProductMallDao;
import com.mmc.pms.entity.AdDO; import com.mmc.pms.entity.AdDO;
import com.mmc.pms.entity.GoodsInfoDO;
import com.mmc.pms.entity.ProductCategory; import com.mmc.pms.entity.ProductCategory;
import com.mmc.pms.model.other.dto.AdDTO; import com.mmc.pms.model.other.dto.AdDTO;
import com.mmc.pms.model.sale.dto.ProductCategoryDTO; import com.mmc.pms.model.sale.dto.ProductCategoryDTO;
import com.mmc.pms.model.qo.GoodsInfoQO;
import com.mmc.pms.model.sale.dto.GoodsInfoListDTO;
import com.mmc.pms.page.PageResult;
import com.mmc.pms.service.WebProductMallService; import com.mmc.pms.service.WebProductMallService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -23,8 +19,7 @@ import java.util.stream.Collectors; ...@@ -23,8 +19,7 @@ import java.util.stream.Collectors;
@Service @Service
public class WebProductMallServiceImpl implements WebProductMallService { public class WebProductMallServiceImpl implements WebProductMallService {
@Autowired @Autowired private WebProductMallDao webProductMallDao;
private WebProductMallDao webProductMallDao;
@Override @Override
public ResultBody productCategory() { public ResultBody productCategory() {
...@@ -66,26 +61,6 @@ public class WebProductMallServiceImpl implements WebProductMallService { ...@@ -66,26 +61,6 @@ public class WebProductMallServiceImpl implements WebProductMallService {
} }
@Override @Override
public PageResult listPageGoodsInfo(GoodsInfoQO param) {
int count = webProductMallDao.countListGoodsInfo(param);
if (count == 0) {
return PageResult.buildPage(param.getPageNo(), param.getPageSize(), count);
}
Integer pageNo = param.getPageNo();
param.buildCurrentPage();
List<GoodsInfoDO> goodsInfo = webProductMallDao.listGoodsInfo(param);
goodsInfo.stream()
.forEach(
t -> {
Integer product = webProductMallDao.findProduct(t.getId());
t.setIsCoupons(product);
});
List<GoodsInfoListDTO> pageList =
goodsInfo.stream().map(GoodsInfoDO::buildGoodsInfoListDTO).collect(Collectors.toList());
return PageResult.buildPage(pageNo, param.getPageSize(), count, pageList);
}
@Override
public ResultBody<AdDTO> ad() { public ResultBody<AdDTO> ad() {
List<AdDO> ad = webProductMallDao.ad(); List<AdDO> ad = webProductMallDao.ad();
List<AdDTO> collect = List<AdDTO> collect =
......
...@@ -157,7 +157,7 @@ ...@@ -157,7 +157,7 @@
FROM goods_info gi FROM goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id INNER JOIN goods_img img ON gi.id = img.goods_info_id
<where> <where>
gi.is_deleted = 0 and gi.shelf_status = 0 and gi.goods_type = 1 gi.is_deleted = 0 and gi.shelf_status = 0 and gi.goods_type = #{type}
<if test="categoryIds != null and categoryIds.size != 0"> <if test="categoryIds != null and categoryIds.size != 0">
<foreach collection="categoryIds" item="item" index="index" open="and gi.category_by_one IN (" close=")" <foreach collection="categoryIds" item="item" index="index" open="and gi.category_by_one IN (" close=")"
separator=","> separator=",">
...@@ -180,9 +180,9 @@ ...@@ -180,9 +180,9 @@
goods_info gi goods_info gi
INNER JOIN goods_img img ON gi.id = img.goods_info_id and img.img_type = 0 INNER JOIN goods_img img ON gi.id = img.goods_info_id and img.img_type = 0
<where> <where>
gi.is_deleted = 0 and gi.shelf_status = 0 and gi.goods_type = 1 gi.is_deleted = 0 and gi.shelf_status = 0 and gi.goods_type = #{type}
<if test="categoryIds != null"> <if test="param.categoryId != null">
<foreach collection="categoryIds" item="item" index="index" open="and gi.category_by_one IN (" close=")" <foreach collection="param" item="item" index="index" open="and gi.category_by_one IN (" close=")"
separator=","> separator=",">
#{item} #{item}
</foreach> </foreach>
...@@ -195,7 +195,7 @@ ...@@ -195,7 +195,7 @@
</if> </if>
</where> </where>
order by gi.create_time DESC order by gi.create_time DESC
limit #{pageNo},#{pageSize} limit #{param.pageNo},#{param.pageSize}
</select> </select>
<select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer"> <select id="getWareInfoById" resultMap="wareInfoResultMap" parameterType="java.lang.Integer">
select wi.id, select wi.id,
......
...@@ -7,6 +7,6 @@ data-filter: ...@@ -7,6 +7,6 @@ data-filter:
- /pms/swagger-resources/** - /pms/swagger-resources/**
- /pms/webjars/** - /pms/webjars/**
- /pms/product/spec/feignGetSpecLeaseUnitPrice - /pms/product/spec/feignGetSpecLeaseUnitPrice
- /pms//lease/goods/deviceList - /pms/product/mall/deviceList
- /pms/classify/queryCategoryInfoByType - /pms/classify/queryCategoryInfoByType
- /pms/lease/goods/getLeaseGoodsDetail - /pms/product/mall/getLeaseGoodsDetail
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论