Commit 1101833a authored by ysongq's avatar ysongq

db-1 功能完成

parent 6581f63c
...@@ -18,4 +18,8 @@ ...@@ -18,4 +18,8 @@
alter table t_data_goods_category add `category_location` varchar(128) DEFAULT NULL COMMENT '图片位置'; alter table t_data_goods_category add `category_location` varchar(128) DEFAULT NULL COMMENT '图片位置';
alter table t_data_goods_category add category_desc varchar(40) DEFAULT NULL COMMENT '分类描述'; alter table t_data_goods_category add category_desc varchar(40) DEFAULT NULL COMMENT '分类描述';
alter table t_banner add sort Bigint(20) DEFAULT NULL COMMENT '排序'; alter table t_banner add sort Bigint(20) DEFAULT NULL COMMENT '排序';
alter table t_banner add banner_url varchar(128) DEFAULT NULL COMMENT '广告链接'; alter table t_banner add banner_url varchar(128) DEFAULT NULL COMMENT '广告链接';
\ No newline at end of file alter table t_mall_customer add customer_source char(2) DEFAULT NULL COMMENT '账号来源:01DB,02VSS';
alter table t_department add department_source char(2) DEFAULT NULL COMMENT '企业来源:01DB,02VSS';
alter table t_mall_customer add vendor_id varchar(128) DEFAULT NULL COMMENT '供应商编码';
alter table t_order add department_id bigint(20) DEFAULT NULL COMMENT '企业id';
\ No newline at end of file
...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel; ...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -28,6 +29,11 @@ public class MallCustomerApiDto implements Serializable { ...@@ -28,6 +29,11 @@ public class MallCustomerApiDto implements Serializable {
*/ */
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Long departmentId; private Long departmentId;
@ApiModelProperty(value = "企业名称")
private String departmentName;
@ApiModelProperty(value = "供应商编号")
private String vendorId;
/** /**
* 密码 * 密码
*/ */
......
package com.jz.common.entity; package com.jz.common.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
...@@ -21,120 +24,152 @@ public class Department implements Serializable { ...@@ -21,120 +24,152 @@ public class Department implements Serializable {
/** /**
* 企业id * 企业id
*/ */
@TableId(value = "department_id",type = IdType.AUTO)
private Long departmentId; private Long departmentId;
/** /**
* 企业名称 * 企业名称
*/ */
@TableField(value = "department_name")
private String departmentName; private String departmentName;
/** /**
* 法人代表 * 法人代表
*/ */
@TableField(value = "legal_representative")
private String legalRepresentative; private String legalRepresentative;
/** /**
* 省份 * 省份
*/ */
@TableField(value = "province")
private String province; private String province;
/** /**
* 城市 * 城市
*/ */
@TableField(value = "city")
private String city; private String city;
@TableField(value = "linkman")
private String linkman; private String linkman;
/** /**
* 行业 * 行业
*/ */
@TableField(value = "industry")
private String industry; private String industry;
/** /**
* 联系电话 * 联系电话
*/ */
@TableField(value = "telephone")
private String telephone; private String telephone;
/** /**
* 注册地址 * 注册地址
*/ */
@TableField(value = "registered_address")
private String registeredAddress; private String registeredAddress;
/** /**
* 区域编码 * 区域编码
*/ */
@TableField(value = "zone_code")
private Object zoneCode; private Object zoneCode;
/** /**
* 企业照片 * 企业照片
*/ */
@TableField(value = "depart_picture")
private String departPicture; private String departPicture;
/** /**
* 营业执照 * 营业执照
*/ */
@TableField(value = "business_license")
private String businessLicense; private String businessLicense;
/** /**
* 税务登记 * 税务登记
*/ */
@TableField(value = "tax_registration")
private String taxRegistration; private String taxRegistration;
/** /**
* 企业照片(代码)到期时间 * 企业照片(代码)到期时间
*/ */
@TableField(value = "depart_picture_time")
private Date departPictureTime; private Date departPictureTime;
/** /**
* 营业执照到期时间 * 营业执照到期时间
*/ */
@TableField(value = "business_license_time")
private Date businessLicenseTime; private Date businessLicenseTime;
/** /**
* 税务登记到期时间 * 税务登记到期时间
*/ */
@TableField(value = "tax_registration_time")
private Date taxRegistrationTime; private Date taxRegistrationTime;
@TableField(value = "department_source")
private String departmentSource;
/** /**
* 统一社会信用代码 * 统一社会信用代码
*/ */
@TableField(value = "unified_credit_code")
private String unifiedCreditCode; private String unifiedCreditCode;
/** /**
* 开户行名称 * 开户行名称
*/ */
@TableField(value = "bank_name")
private String bankName; private String bankName;
/** /**
* 银行卡号 * 银行卡号
*/ */
@TableField(value = "bank_card_number")
private String bankCardNumber; private String bankCardNumber;
/** /**
* 开户行地址 * 开户行地址
*/ */
@TableField(value = "bank_address")
private String bankAddress; private String bankAddress;
/** /**
* 开户行号 * 开户行号
*/ */
@TableField(value = "bank_no")
private String bankNo; private String bankNo;
/** /**
* 审核状态:01待审核,02已审核,03未通过 * 审核状态:01待审核,02已审核,03未通过
*/ */
@TableField(value = "audit_status")
private String auditStatus; private String auditStatus;
/** /**
* 驳回原因 * 驳回原因
*/ */
@TableField(value = "reject_reason")
private String rejectReason; private String rejectReason;
/** /**
* 审核人 * 审核人
*/ */
@TableField(value = "audit_person")
private String auditPerson; private String auditPerson;
/** /**
* 审核时间 * 审核时间
*/ */
@TableField(value = "audit_time")
private Date auditTime; private Date auditTime;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(value = "cre_time")
private Date creTime; private Date creTime;
/** /**
* 创建人 * 创建人
*/ */
@TableField(value = "cre_person")
private String crePerson; private String crePerson;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(value = "upt_time")
private Date uptTime; private Date uptTime;
/** /**
* 更新人 * 更新人
*/ */
@TableField(value = "upt_person")
private String uptPerson; private String uptPerson;
/** /**
* 删除标识 * 删除标识
*/ */
@TableField(value = "del_flag")
private String delFlag; private String delFlag;
......
...@@ -18,16 +18,16 @@ import javax.annotation.Resource; ...@@ -18,16 +18,16 @@ import javax.annotation.Resource;
@Slf4j @Slf4j
@Component @Component
public class CurrentUserUtil { public class CurrentUserUtil {
//
@Resource // @Resource
private static RedisTemplate redisTemplate; // private static RedisTemplate redisTemplate;
//
//
//
public static SysUserDto userDto() { // public static SysUserDto userDto() {
SysUserDto userDto = (SysUserDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS); // SysUserDto userDto = (SysUserDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_SYS);
return userDto; // return userDto;
} // }
} }
package com.jz.dm.mall.moduls.controller; package com.jz.dm.mall.moduls.controller;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginByVSSReq;
import com.jz.dm.mall.moduls.service.MallCustomerService;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController; import org.springframework.web.bind.annotation.RestController;
import com.jz.dm.mall.moduls.service.TestService; import com.jz.dm.mall.moduls.service.TestService;
import org.springframework.web.servlet.ModelAndView;
@RestController import javax.servlet.http.HttpServletResponse;
@Controller
@RequestMapping("/test") @RequestMapping("/test")
public class TestController { public class TestController {
@Autowired @Autowired
private TestService testService; private TestService testService;
@Autowired
private MallCustomerService service;
public static void main(String[] args) { public static void main(String[] args) {
System.out.println("s"); System.out.println("s");
} }
...@@ -51,10 +65,11 @@ public class TestController { ...@@ -51,10 +65,11 @@ public class TestController {
// wk.close(); // wk.close();
// } // }
@RequestMapping("/hello") @RequestMapping(value = "/hello",method = RequestMethod.POST)
public void test() throws Exception { @ApiOperation("hello")
public String test() throws Exception {
//Result result = service.loginByVss(req);
return "redirect:http://www.baidu.com";
} }
} }
...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.controller.company; ...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.controller.company;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyAddReq; import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyAddReq;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyEditReq;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq; import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq;
import com.jz.dm.mall.moduls.service.CompanyAuthService; import com.jz.dm.mall.moduls.service.CompanyAuthService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
...@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -12,6 +13,7 @@ import org.springframework.web.bind.annotation.*;
import reactor.core.publisher.Mono; import reactor.core.publisher.Mono;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
/** /**
* @author ZC * @author ZC
...@@ -74,12 +76,29 @@ public class CompanyAuthController { ...@@ -74,12 +76,29 @@ public class CompanyAuthController {
return Mono.fromSupplier(() ->companyAuthService.checkCompanyInfo(request)); return Mono.fromSupplier(() ->companyAuthService.checkCompanyInfo(request));
} }
@PostMapping("editCompany")
@ApiOperation(value = "重新认证企业")
public Result editCompany(@RequestBody @Valid CompanyEditReq req) {
return companyAuthService.editCompany(req);
}
/**
* 获取省份
* @return
*/
@GetMapping("/getProvince") @GetMapping("/getProvince")
@ApiOperation(value = "获取所有省份") @ApiOperation(value = "获取所有省份")
public Result getProvince() { public Result getProvince() {
return companyAuthService.getProvince(); return companyAuthService.getProvince();
} }
/**
* 获取城市
* @param provinceCode
* @param cityCode
* @return
*/
@PostMapping("/getCity") @PostMapping("/getCity")
@ApiOperation(value = "获取当前省份下的城市") @ApiOperation(value = "获取当前省份下的城市")
public Result getCity(@RequestParam(name = "provinceCode") String provinceCode, public Result getCity(@RequestParam(name = "provinceCode") String provinceCode,
......
...@@ -64,6 +64,6 @@ public class CompanyAddReq implements Serializable { ...@@ -64,6 +64,6 @@ public class CompanyAddReq implements Serializable {
@ApiModelProperty(value = "登录用户名称",hidden = true) @ApiModelProperty(value = "登录用户名称",hidden = true)
private String loginName; private String loginName;
@ApiModelProperty(value = "用户角色 2:卖方,3:买方") @ApiModelProperty(value = "用户角色 2:卖方,3:买方", hidden = true)
private Long roleId; private Long roleId;
} }
package com.jz.dm.mall.moduls.controller.company.bean.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/18
* @Version:
*/
@ApiModel("重新认证企业校验请求参数")
@Data
public class CompanyEditReq implements Serializable {
@ApiModelProperty(value = "统一社会编码",required = true)
@NotNull(message = "统一社会编码不能为空")
private String unifiedCreditCode;
}
package com.jz.dm.mall.moduls.controller.customer; package com.jz.dm.mall.moduls.controller.customer;
import com.jz.common.constant.RedisMessageConstant; import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginByVSSReq;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginRequest; import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginRequest;
import com.jz.dm.mall.moduls.entity.MallCustomer; import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.service.MallCustomerService; import com.jz.dm.mall.moduls.service.MallCustomerService;
...@@ -11,9 +13,18 @@ import io.swagger.annotations.Api; ...@@ -11,9 +13,18 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.catalina.servlet4preview.http.HttpServletRequest; import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Controller;
import org.springframework.ui.Model;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import org.springframework.web.servlet.ModelAndView;
import org.springframework.web.servlet.mvc.support.RedirectAttributes;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServletResponse;
import java.io.IOException;
/** /**
* @ClassName: * @ClassName:
...@@ -21,7 +32,7 @@ import org.springframework.web.bind.annotation.*; ...@@ -21,7 +32,7 @@ import org.springframework.web.bind.annotation.*;
* @Date: 2020/12/2 * @Date: 2020/12/2
* @Version: * @Version:
*/ */
@RestController @Controller
@RequestMapping("/customer") @RequestMapping("/customer")
@Api(tags = "商城登陆--controller") @Api(tags = "商城登陆--controller")
public class LoginController { public class LoginController {
...@@ -41,11 +52,31 @@ public class LoginController { ...@@ -41,11 +52,31 @@ public class LoginController {
* @return * @return
*/ */
@PostMapping(value = "/login") @PostMapping(value = "/login")
@ResponseBody
@ApiOperation(value = "登陆功能") @ApiOperation(value = "登陆功能")
public Result result(@RequestBody LoginRequest customer) { public Result login(@RequestBody LoginRequest customer) {
return mallCustomerService.loginByUser(customer); return mallCustomerService.loginByUser(customer);
} }
@PostMapping(value = "/loginByVSS")
@ApiOperation(value = "登陆功能--Vss")
public String loginByVss(@RequestBody LoginByVSSReq req) {
try {
Result result = mallCustomerService.loginByVss(req);
return "redirect:http://www.baidu.com";
}catch (Exception e) {
e.printStackTrace();
}
return null;
}
@GetMapping(value = "/getUserMessage")
@ApiOperation(value = "vss--获取用户信息")
@ResponseBody
public Result getUserMessage() {
return mallCustomerService.getUserMessage();
}
/** /**
* 手机获取验证码 * 手机获取验证码
* *
...@@ -53,6 +84,7 @@ public class LoginController { ...@@ -53,6 +84,7 @@ public class LoginController {
* @return * @return
*/ */
@PostMapping(value = "/getCode") @PostMapping(value = "/getCode")
@ResponseBody
@ApiOperation("通过手机号码获取验证码") @ApiOperation("通过手机号码获取验证码")
public Result loginCheck(@RequestParam(value = "telephone") String telephone, public Result loginCheck(@RequestParam(value = "telephone") String telephone,
@RequestParam(value = "validateCode")String validateCode) throws Exception{ @RequestParam(value = "validateCode")String validateCode) throws Exception{
...@@ -79,6 +111,7 @@ public class LoginController { ...@@ -79,6 +111,7 @@ public class LoginController {
* @return * @return
*/ */
@GetMapping(value = "/phoneCheck") @GetMapping(value = "/phoneCheck")
@ResponseBody
@ApiOperation(value = "手机号码校验接口", notes = "手机号码是否已注册") @ApiOperation(value = "手机号码校验接口", notes = "手机号码是否已注册")
public Result phoneCheck(@RequestParam("telephone") String telephone) throws Exception{ public Result phoneCheck(@RequestParam("telephone") String telephone) throws Exception{
if (telephone == null) { if (telephone == null) {
...@@ -101,6 +134,7 @@ public class LoginController { ...@@ -101,6 +134,7 @@ public class LoginController {
* @return * @return
*/ */
@GetMapping(value = "/phoneUserCheck") @GetMapping(value = "/phoneUserCheck")
@ResponseBody
@ApiOperation(value = "手机号用户名重复校验接口", notes = "手机号用户名是否重复") @ApiOperation(value = "手机号用户名重复校验接口", notes = "手机号用户名是否重复")
public Result phoneCheck(@RequestParam(value = "username") String username , public Result phoneCheck(@RequestParam(value = "username") String username ,
@RequestParam(value = "password") String telephone, HttpServletRequest request) throws Exception{ @RequestParam(value = "password") String telephone, HttpServletRequest request) throws Exception{
......
package com.jz.dm.mall.moduls.controller.customer.bean.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/24
* @Version:
*/
@ApiModel(value = "vss登陆账号请求参数")
@Data
public class LoginByVSSReq implements Serializable {
@ApiModelProperty(value = "用户账号")
@NotNull(message = "用户账号不能为空")
private String customerAccount;
@ApiModelProperty(value = "企业名称")
@NotNull(message = "企业名称不能为空")
private String departmentName;
@ApiModelProperty(value = "统一社会信用代码")
@NotNull(message = "统一社会信用代码不能为空")
private String unifiedCreditCode;
@ApiModelProperty(value = "供应商编码")
@NotNull(message = "供应商编码不能为空")
private String vendorId;
}
...@@ -4,15 +4,14 @@ package com.jz.dm.mall.moduls.controller.goods; ...@@ -4,15 +4,14 @@ package com.jz.dm.mall.moduls.controller.goods;
import com.jz.common.base.BaseController; import com.jz.common.base.BaseController;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataApiDetailsReq;
import com.jz.dm.mall.moduls.service.DataGoodsApiService; import com.jz.dm.mall.moduls.service.DataGoodsApiService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.*;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import javax.validation.Valid;
import java.util.List; import java.util.List;
/** /**
...@@ -23,7 +22,7 @@ import java.util.List; ...@@ -23,7 +22,7 @@ import java.util.List;
*/ */
@RestController @RestController
@RequestMapping("dataGoodsApi") @RequestMapping("dataGoodsApi")
@Api(tags = "数据api-controller") @Api(tags = "商城--数据目录--controller")
public class DataGoodsApiController extends BaseController { public class DataGoodsApiController extends BaseController {
/** /**
* 服务对象 * 服务对象
...@@ -33,15 +32,12 @@ public class DataGoodsApiController extends BaseController { ...@@ -33,15 +32,12 @@ public class DataGoodsApiController extends BaseController {
/** /**
* 根据主键查询商品详情-api * 根据主键查询商品详情-api
* @param id * @param
* @return * @return
*/ */
@GetMapping("/getGoodsDetails/{id}") @PostMapping("/findByDetails")
@ApiOperation(value = "点击商品查看商品详情", notes = "api商品") @ApiOperation(value = "数据预览--商品详情", notes = "api商品")
public Result<List<DataGoodsApiDto>> findById(@PathVariable(value = "id") Long id) { public Result findByDetails(@RequestBody @Valid DataApiDetailsReq req) {
if (id != null) { return tDataGoodsApiService.findByDetails(req);
return tDataGoodsApiService.selectById(id);
}
return Result.of_error("查询失败!");
} }
} }
\ No newline at end of file
...@@ -20,21 +20,31 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -20,21 +20,31 @@ import org.springframework.web.bind.annotation.RestController;
*/ */
@RestController @RestController
@RequestMapping("dataGoodsCategory") @RequestMapping("dataGoodsCategory")
@Api(tags = "数据商品分类行业") @Api(tags = "商城--数据银行首页--controller")
public class DataGoodsCategoryController extends BaseController { public class DataGoodsCategoryController extends BaseController {
/** /**
* 服务对象 * 服务对象
*/ */
@Autowired @Autowired
private DataGoodsCategoryService categoryService; private DataGoodsCategoryService categoryService;
/**
* 查询数据商品分类
* @return
*/
@GetMapping(value = "/findCategory") @GetMapping(value = "/findCategory")
@ApiOperation(value = "查询数据商品分类", notes = "查询所有的商品分类") @ApiOperation(value = "首页--展示一级数据分类")
public Result findCategory() { public Result findCategory() {
Result result = categoryService.findCategory(); return categoryService.findCategory();
if (StringUtils.isEmpty(result)) {
return Result.of_error("查询失败!");
}
return result;
} }
/**
* 查询场景分类
* @return
*/
@GetMapping(value = "/findScene")
@ApiOperation(value = "首页--展示场景分类")
public Result findScene() {
return categoryService.findScene();
}
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.controller.goods; package com.jz.dm.mall.moduls.controller.goods;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseController; import com.jz.common.base.BaseController;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataApiUpReq; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataApiUpReq;
...@@ -29,7 +32,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -29,7 +32,7 @@ import javax.servlet.http.HttpServletRequest;
*/ */
@RestController @RestController
@RequestMapping("dataGoods") @RequestMapping("dataGoods")
@Api(tags = "数据商品管理--controller") @Api(tags = "商城--数据目录--controller")
public class DataGoodsController extends BaseController { public class DataGoodsController extends BaseController {
/** /**
* 服务对象 * 服务对象
...@@ -94,25 +97,28 @@ public class DataGoodsController extends BaseController { ...@@ -94,25 +97,28 @@ public class DataGoodsController extends BaseController {
/** /**
* 列表查询商品数据 * 列表查询商品数据
* @param dataGoodsListRequest * @param req
* @param httpRequest * @param httpRequest
* @return * @return
*/ */
@PostMapping(value = "/findList") @PostMapping(value = "/findList")
@ApiOperation(value = "分页展示商品列表", notes = "首页点击分类展示商品列表") @ApiOperation(value = "数据目录--分页展示商品列表", notes = "首页点击分类展示商品列表")
public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) { public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest req, HttpServletRequest httpRequest) {
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<DataGoodsListDto>(); PageInfoResponse<DataGoodsListDto> baseBeanResponse = new PageInfoResponse<DataGoodsListDto>();
try { try {
pageInfo = dataGoodsService.findList(dataGoodsListRequest, httpRequest); baseBeanResponse = dataGoodsService.findList(req, httpRequest);
} catch (Exception e) { } catch (Exception e) {
pageInfo.setMessage("查询失败"); baseBeanResponse.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE); baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace(); e.printStackTrace();
} }
return pageInfo; return baseBeanResponse;
} }
/**新增数据商品 /**新增数据商品
* @param * @param
* @return * @return
......
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/20
* @Version:
*/
@ApiModel("api详情返回参数")
@Data
public class DataApiDetailsDto implements Serializable {
@ApiModelProperty(value = "apiId")
private Long id;
@ApiModelProperty(value = "apiKey")
private String apiKey;
@ApiModelProperty(value = "api名称")
private String apiName;
@ApiModelProperty(value = "返回类型")
private String outputType;
@ApiModelProperty(value = "目标地址")
private String targetUrl;
@ApiModelProperty(value = "加密方式 0:无 1:MD5,2:RES")
private String signType;
@ApiModelProperty(value = "传输方式 0,http,1.https")
private String apiProtocl;
@ApiModelProperty(value = "超时时间")
private Integer timeout;
@ApiModelProperty(value = "请求方式")
private String reqType;
@ApiModelProperty(value = "最大行数")
private Integer maxRow;
@ApiModelProperty(value = "每页返回数")
private Integer pageRow;
@ApiModelProperty(value = "调用限制")
private Long reqFrequency;
@ApiModelProperty(value = "api描述")
private String apiFunction;
@ApiModelProperty(value = "最大数据量")
private Integer maxData;
@ApiModelProperty(value = "请求参数")
private String requestParam;
@ApiModelProperty(value = "返回参数")
private String responseParam;
@ApiModelProperty(value = "api类型")
private String apiType;
}
package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/23
* @Version:
*/
@ApiModel("返回参数")
@Data
public class DataApiDetailsParamsDto implements Serializable {
@ApiModelProperty(value = "参数名称")
private String paramsName;
@ApiModelProperty(value = "参数类型")
private String paramsType;
@ApiModelProperty(value = "参数描述")
private String paramsDesc;
@ApiModelProperty(value = "是否必填")
private String ifRequird;
}
package com.jz.dm.mall.moduls.controller.goods.bean.dto; package com.jz.dm.mall.moduls.controller.goods.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import com.jz.common.entity.DataGoodsApiParams;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* @ClassName: 商品详情参数封装 * @ClassName: 商品详情参数封装
...@@ -22,163 +22,91 @@ import java.util.List; ...@@ -22,163 +22,91 @@ import java.util.List;
public class DataGoodsApiDto implements Serializable { public class DataGoodsApiDto implements Serializable {
/** /**
* api商品id * 商品详情
*/ */
@ApiModelProperty(value = "api商品id") @ApiModelProperty(value = "商品名称")
private Long goodsApi;
/**
* 数据id
*/
@ApiModelProperty(value = "数据id")
private Long dataGoodsId;
@ApiModelProperty(value = "分类名称")
private String categoryName;
/**
* api参数id
*/
@ApiModelProperty(value = "api参数id")
private Long apiParamsId;
/**
* api服务名称
*/
@ApiModelProperty(value = "数据名称")
private String dataName; private String dataName;
/** @ApiModelProperty(value = "api描述")
* 请求类型(方式) private String apiFunction;
*/
@ApiModelProperty(value = "请求类型(方式)")
private String requestType;
/**
* api接口地址
*/
@ApiModelProperty(value = "api接口地址")
private String apiUrl;
/**
* api接口方法
*/
@ApiModelProperty(value = "api接口方法")
private String apiMethod;
/** @ApiModelProperty(value = "服务商",hidden = true)
* api请求协议 private String userId;
*/
@ApiModelProperty(value = "api请求协议")
private String apiProtocl;
/**
* 返回类型
*/
@ApiModelProperty(value = "返回类型")
private String returnType;
@ApiModelProperty(value = "apiKey")
private String apiKey;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间") @ApiModelProperty(value = "更新时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date uptTime; private Date uptTime;
/** @ApiModelProperty(value = "所属商品分类")
* 价格类型 private String categoryName;
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
@ApiModelProperty(value = "商品价格") @ApiModelProperty(value = "")
private BigDecimal dataPrice; private String yearType;
/** @ApiModelProperty(value = "季")
* 供应商名称 private String seasonType;
*/
@ApiModelProperty(value = "供应商名称")
private String supplierName;
/** @ApiModelProperty(value = "月")
* 参数分类 private String monthType;
*/
@ApiModelProperty(value = "参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数")
private String paramsDiff;
@ApiModelProperty(value = "年(元)") @ApiModelProperty(value = "")
private BigDecimal yearType; private String secondType;
@ApiModelProperty(value = "季(元)") @ApiModelProperty(value = "商品有限期")
private BigDecimal seasonType; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date goodsLimited;
@ApiModelProperty(value = "月(元)") @ApiModelProperty(value = "数据大小")
private BigDecimal monthType; private String dataBag;
@ApiModelProperty(value = "次(元)") @ApiModelProperty(value = "商品描述")
private BigDecimal secondType; private String dataDesc;
/** @ApiModelProperty(value = "商品图片")
* 参数名称 private String dataPicture;
*/
@ApiModelProperty(value = "参数名称")
private String paramsName;
/** @ApiModelProperty(value = "价格类型 01免费 02收费")
* 参数类型 private String priceType;
*/
@ApiModelProperty(value = "参数类型")
private String paramsTYpe;
/** @ApiModelProperty(value = "调用次数上限")
* 参数描述 private Long reqFrequency;
*/
@ApiModelProperty(value = "参数描述")
private String paramsDesc;
/** /**
* 默认值 * api详情
*/ */
@ApiModelProperty(value = "默认值") @ApiModelProperty(value = "接口地址")
private String defaultValue; private String targetUrl;
/** @ApiModelProperty(value = "加密方式 0:无,1:MD5, 2:RSA")
* 是否必选 private String signType;
*/
@ApiModelProperty(value = "是否必选:Y是,N否")
private String ifRequird;
/** @ApiModelProperty(value = "传输方式")
* 数据类型 private String apiProtocl;
*/
@ApiModelProperty(value = "数据类型")
private String dataType;
/** @ApiModelProperty(value = "请求方式")
* api返回数据样例 private String reqType;
*/
@ApiModelProperty(value = "api返回数据样例")
private String returnDataExample;
/** @ApiModelProperty(value = "超时时间")
* api请求样例 private Integer timeout;
*/
@ApiModelProperty(value = "api请求样例")
private String requestExample;
@ApiModelProperty(value = "参数分类数字") @ApiModelProperty(value = "返回类型")
private String paramsDiffNum; private String outputType;
@ApiModelProperty(value = "数据最大量")
private Integer maxData;
@ApiModelProperty(value = "数据商品图片") @ApiModelProperty(value = "最大页数")
private String dataPicture; private Integer maxRow;
@ApiModelProperty(value = "数据描述") @ApiModelProperty(value = "每页数据量")
private String dataDesc; private String pageRow;
@ApiModelProperty(value = "请求参数")
private List<Map<String, String>> requestParam;
@ApiModelProperty(value = "返回参数")
private List<Map<String, String>> responseParam;
@ApiModelProperty(value = "创建时间")
private Date creTime;
} }
...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -5,6 +5,7 @@ import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date;
/** /**
...@@ -23,79 +24,30 @@ public class DataGoodsListDto { ...@@ -23,79 +24,30 @@ public class DataGoodsListDto {
@ApiModelProperty(value = "数据商品id") @ApiModelProperty(value = "数据商品id")
private Long dataGoodsId; private Long dataGoodsId;
/**
* 商品分类id
*/
@ApiModelProperty(value = "商品分类id")
private Long categoryId;
/** /**
* 数据商品名称 * 数据商品名称
*/ */
@ApiModelProperty(value = "数据商品名称") @ApiModelProperty(value = "数据商品名称")
private String dataName; private String dataName;
/** @ApiModelProperty(value = "数据描述")
* 分类名称 private String dataDesc;
*/
@ApiModelProperty(value = "分类名称")
private String categoryName;
/**
* 数据类型
*/
@ApiModelProperty(value = "数据类型:01api,02数据包")
private String dataType;
/**
* 数据商品标签
*/
@ApiModelProperty(value = "数据商品标签")
private String dataLabel;
/**
* 数据商品图片
*/
@ApiModelProperty(value = "数据商品图片")
private String dataPicture;
/**
* 数据商品价格
*/
@ApiModelProperty(value = "数据商品价格")
private BigDecimal dataPrice;
/**
* 价格类型
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 年(元)
*/
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
/** @ApiModelProperty("更新时间")
* 季(元) private Date uptTime;
*/
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
/**
* 月(元)
*/
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
/** @ApiModelProperty("对接客户数")
* 次(元) private String userNumbers;
*/
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
@ApiModelProperty("apiKey")
private String apiKey;
@ApiModelProperty("授权")
private String goodsToken;
@ApiModelProperty("商品分类id")
private Long categoryId;
@ApiModelProperty("场景分类id")
private Long sceneId;
} }
package com.jz.dm.mall.moduls.controller.goods.bean.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/22
* @Version:
*/
@ApiModel(value = "数据预览--商品详情请求参数")
@Data
public class DataApiDetailsReq implements Serializable {
@ApiModelProperty(value = "商品id")
@NotNull(message = "商品id不能为空")
private Long dataGoodsId;
@ApiModelProperty(value = "apiKey")
@NotNull(message = "apiKey不能为空")
private String apiKey;
@ApiModelProperty(value = "是否授权")
private String goodsToken;
}
...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.controller.goods.bean.request; ...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.controller.goods.bean.request;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -12,7 +13,8 @@ import java.util.Date; ...@@ -12,7 +13,8 @@ import java.util.Date;
* @Date: 2020/12/9 * @Date: 2020/12/9
* @Version: * @Version:
*/ */
@ApiModel(value = "数据集市--数据商品列表参数对象", description = "数据商品列表参数对象") @ApiModel(value = "数据目录--数据商品列表参数对象", description = "数据商品列表参数对象")
@Data
public class DataGoodsListRequest extends BasePageBean { public class DataGoodsListRequest extends BasePageBean {
/** /**
...@@ -21,35 +23,8 @@ public class DataGoodsListRequest extends BasePageBean { ...@@ -21,35 +23,8 @@ public class DataGoodsListRequest extends BasePageBean {
@ApiModelProperty(value = "商品分类id") @ApiModelProperty(value = "商品分类id")
private Long categoryId; private Long categoryId;
/** @ApiModelProperty(value = "场景分类id")
* 价格类型 private Long sceneId;
*/
@ApiModelProperty(value = "价格类型")
private String priceType;
/**
* 综合排序
*/
@ApiModelProperty(value = "综合排序")
private String synthesizeRank;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
/**
* 数据商品名称
*/
@ApiModelProperty(value = "数据商品名称")
private String dataName;
/**
* 使用人数
*/
@ApiModelProperty(value = "使用人数")
private Long usePerson;
/** /**
* 数据类型 * 数据类型
...@@ -57,59 +32,7 @@ public class DataGoodsListRequest extends BasePageBean { ...@@ -57,59 +32,7 @@ public class DataGoodsListRequest extends BasePageBean {
@ApiModelProperty(value = "数据类型:01api,02数据包") @ApiModelProperty(value = "数据类型:01api,02数据包")
private String dataType; private String dataType;
public Long getUsePerson() { @ApiModelProperty(value = "数据搜索商品名称")
return usePerson; private String dataName;
}
public void setUsePerson(Long usePerson) {
this.usePerson = usePerson;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getSynthesizeRank() {
return synthesizeRank;
}
public void setSynthesizeRank(String synthesizeRank) {
this.synthesizeRank = synthesizeRank;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
} }
...@@ -144,12 +144,6 @@ public class OrderController { ...@@ -144,12 +144,6 @@ public class OrderController {
@PostMapping(value = "/resetSalt") @PostMapping(value = "/resetSalt")
@ApiOperation(value = "订单详情---重置盐值", notes = "重置盐值") @ApiOperation(value = "订单详情---重置盐值", notes = "重置盐值")
public Result resetSalt(@RequestBody @Valid SaltResetReq req) { public Result resetSalt(@RequestBody @Valid SaltResetReq req) {
Result result = new Result(); return orderService.updateSalt(req);
if (StringUtils.isNotEmpty(req.getGoodsToken()) && req.getId() != null) {
result = orderService.updateSalt(req);
}else {
result.setMessage("参数不能为空!");
}
return result;
} }
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.controller.order.bean.dto;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/24
* @Version:
*/
@ApiModel(value = "api日志返回参数")
@Data
public class ApiReqLogDto implements Serializable {
/**
* 主健ID
*/
@ApiModelProperty("主健ID")
private Long id;
/**
* 请求ip
*/
@ApiModelProperty("请求ip")
private String requestIp;
/**
* apikey
*/
@ApiModelProperty("api_key")
private String apiKey;
/**
* 请求参数
*/
@ApiModelProperty("request_params")
private String requestParams;
/**
* 返回参数
*/
@ApiModelProperty("response_params")
private String responseParams;
/**
* 请求路径
*/
@ApiModelProperty("request_url")
private String requestUrl;
/**
* 请求方法
*/
@ApiModelProperty("request_method")
private String requestMethod;
/**
* 客户请求token
*/
@ApiModelProperty("request_token")
private String requestToken;
/**
* 处理状态 默认为0 未处理
*/
@ApiModelProperty("处理状态 默认为0 未处理")
private String handlerStatus;
/**
* 请求总耗时
*/
@ApiModelProperty("请求总耗时")
private String requestConsuming;
/**
* 请求开始时间
*/
@ApiModelProperty("请求开始时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date requestStartTime;
/**
* 请求结束时间
*/
@ApiModelProperty("请求结束时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date requestEndTime;
/**
* 请求状态: SUCCEED 成功 ,FAIL 失败
*/
@ApiModelProperty("请求状态: SUCCEED 成功 ,FAIL 失败")
private String status;
/**
* 备注
*/
@TableField("remark")
@JsonIgnore
private String remark;
@ApiModelProperty(value = "调用数")
@TableField(exist = false)
private String callNumber;
@ApiModelProperty(value = "错误率")
@TableField(exist = false)
private String errorRate;
@ApiModelProperty(value = "成功数")
@TableField(exist = false)
private String scSuccess;
@ApiModelProperty(value = "错误数")
@TableField(exist = false)
private String wrongNumber;
}
...@@ -16,6 +16,11 @@ import java.io.Serializable; ...@@ -16,6 +16,11 @@ import java.io.Serializable;
@Data @Data
public class OrderByPurchaserDto implements Serializable { public class OrderByPurchaserDto implements Serializable {
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "商品id")
private Long dataGoodsId;
@ApiModelProperty(value = "商品名称") @ApiModelProperty(value = "商品名称")
private String dataName; private String dataName;
...@@ -29,7 +34,7 @@ public class OrderByPurchaserDto implements Serializable { ...@@ -29,7 +34,7 @@ public class OrderByPurchaserDto implements Serializable {
@ApiModelProperty(value = "价格") @ApiModelProperty(value = "价格")
private String orderMoney; private String orderMoney;
@ApiModelProperty(value = "价格类型") @ApiModelProperty(value = "价格类型 01免费,02收费")
private String priceType; private String priceType;
@ApiModelProperty(value = "盐值") @ApiModelProperty(value = "盐值")
...@@ -40,4 +45,8 @@ public class OrderByPurchaserDto implements Serializable { ...@@ -40,4 +45,8 @@ public class OrderByPurchaserDto implements Serializable {
@ApiModelProperty(value = "apiKey") @ApiModelProperty(value = "apiKey")
private String apiKey; private String apiKey;
@ApiModelProperty(value = "订单状态 01有效,02失效")
private String goodsStatus;
} }
...@@ -31,6 +31,9 @@ public class LogInfoListReq implements Serializable { ...@@ -31,6 +31,9 @@ public class LogInfoListReq implements Serializable {
private String requestToken; private String requestToken;
@ApiModelProperty(value = "创建时间") @ApiModelProperty(value = "创建时间")
private String createDate; private String createDate;
@ApiModelProperty(value = "历史查询-数据银行") @ApiModelProperty(value = "历史查询-数据银行: 输入01")
private String historyQuery; private String historyQuery;
@ApiModelProperty(value = "订单id")
private Long orderId;
} }
...@@ -48,5 +48,6 @@ public class OrderRequest extends BasePageBean { ...@@ -48,5 +48,6 @@ public class OrderRequest extends BasePageBean {
@ApiModelProperty(value = "搜索") @ApiModelProperty(value = "搜索")
private String search; private String search;
@ApiModelProperty(value = "订单状态 01有效,02失效")
private String goodsStatus;
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.entity; package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data; import lombok.Data;
...@@ -18,11 +21,13 @@ import java.io.Serializable; ...@@ -18,11 +21,13 @@ import java.io.Serializable;
public class City implements Serializable { public class City implements Serializable {
private static final long serialVersionUID = -3596309983779919750L; private static final long serialVersionUID = -3596309983779919750L;
private Long id;
@TableId(value = "id", type = IdType.AUTO)
private Long id;
@TableField(value = "name")
private String name; private String name;
@TableField(value = "city_code")
private String city_code; private String cityCode;
@TableField(value = "province_code")
private String province_code; private String provinceCode;
} }
package com.jz.dm.mall.moduls.entity; package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
...@@ -22,32 +26,61 @@ public class DataGoodsCategory implements Serializable { ...@@ -22,32 +26,61 @@ public class DataGoodsCategory implements Serializable {
/** /**
* 商品分类id * 商品分类id
*/ */
@TableId(value = "category_id", type = IdType.AUTO)
@ApiModelProperty(value = "商品分类id")
private Long categoryId; private Long categoryId;
/** /**
* 分类名称 * 分类名称
*/ */
@TableField("category_name")
@ApiModelProperty(value = "分类名称")
private String categoryName; private String categoryName;
/** /**
* 父级分类id * 父级分类id
*/ */
@TableField("parent_id")
@ApiModelProperty(value = "父级分类id")
private Long parentId; private Long parentId;
/** /**
* 是否为子节点:Y是,N否 * 是否为子节点:Y是,N否
*/ */
@TableField("if_child")
@ApiModelProperty(value = "是否为子节点")
private String ifChild; private String ifChild;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField("cre_time")
@ApiModelProperty(value = "创建时间")
private Date creTime; private Date creTime;
@TableField("cre_person")
@ApiModelProperty(value = "创建人")
private String crePerson;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField("upt_time")
@ApiModelProperty(value = "更新时间")
private Date uptTime; private Date uptTime;
private String delFlag; @TableField("upt_person")
@ApiModelProperty(value = "更新人")
private String uptPerson;
@ApiModelProperty(value = "分类描述")
@TableField("category_desc")
private String categoryDesc;
private List<DataGoodsCategory> children; @ApiModelProperty("分类图片")
@TableField("category_picture")
private String categoryPicture;
@ApiModelProperty("分类位置")
@TableField("category_location")
private String categoryLocation;
@TableField("del_flag")
@ApiModelProperty(value = "是否删除")
private String delFlag;
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.entity; package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -16,6 +18,7 @@ import java.util.Date; ...@@ -16,6 +18,7 @@ import java.util.Date;
*/ */
@TableName("t_mall_customer") @TableName("t_mall_customer")
@ApiModel @ApiModel
@Data
public class MallCustomer implements Serializable { public class MallCustomer implements Serializable {
private static final long serialVersionUID = 844124479008859411L; private static final long serialVersionUID = 844124479008859411L;
/** /**
...@@ -26,191 +29,91 @@ public class MallCustomer implements Serializable { ...@@ -26,191 +29,91 @@ public class MallCustomer implements Serializable {
/** /**
* 企业id * 企业id
*/ */
@TableField(value = "department_id")
private Long departmentId; private Long departmentId;
/** /**
* 密码 * 密码
*/ */
@TableField(value = "password")
private String password; private String password;
/** /**
* 账户 * 账户
*/ */
@TableField(value = "customer_account")
private String customerAccount; private String customerAccount;
/** /**
* 用户真实姓名 * 用户真实姓名
*/ */
@TableField(value = "customer_name")
private String customerName; private String customerName;
/** /**
* 联系电话 * 联系电话
*/ */
@TableField(value = "customer_phone")
private String customerPhone; private String customerPhone;
/** /**
* 邮箱 * 邮箱
*/ */
@TableField(value = "customer_email")
private String customerEmail; private String customerEmail;
/** /**
* 地址 * 地址
*/ */
@TableField(value = "customer_address")
private String customerAddress; private String customerAddress;
/**
* 供应商编码
*/
@TableField(value = "vendor_id")
private String vendorId;
/**
* 账号来源
*/
@TableField(value = "customer_source")
private String customerSource;
/** /**
* 用户积分 * 用户积分
*/ */
@TableField(value = "customer_point")
private Long customerPoint; private Long customerPoint;
/** /**
* 注册时间 * 注册时间
*/ */
@TableField(value = "register_time")
private Date registerTime; private Date registerTime;
/** /**
* 会员等级 * 会员等级
*/ */
@TableField(value = "customer_level")
private String customerLevel; private String customerLevel;
/** /**
* 证件号 * 证件号
*/ */
@TableField(value = "identity_card")
private String identityCard; private String identityCard;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(value = "cre_time")
private Date creTime; private Date creTime;
@TableField(value = "cre_person")
private String crePerson;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(value = "upt_time")
private Date uptTime; private Date uptTime;
/** /**
* 更新人 * 更新人
*/ */
@TableField(value = "upt_person")
private String uptPerson; private String uptPerson;
/** /**
* 删除标识:Y是,N否 * 删除标识:Y是,N否
*/ */
@TableField(value = "del_flag")
private String delFlag; private String delFlag;
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public String getCustomerAccount() {
return customerAccount;
}
public void setCustomerAccount(String customerAccount) {
this.customerAccount = customerAccount;
}
public String getCustomerName() {
return customerName;
}
public void setCustomerName(String customerName) {
this.customerName = customerName;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getCustomerEmail() {
return customerEmail;
}
public void setCustomerEmail(String customerEmail) {
this.customerEmail = customerEmail;
}
public String getCustomerAddress() {
return customerAddress;
}
public void setCustomerAddress(String customerAddress) {
this.customerAddress = customerAddress;
}
public Long getCustomerPoint() {
return customerPoint;
}
public void setCustomerPoint(Long customerPoint) {
this.customerPoint = customerPoint;
}
public Date getRegisterTime() {
return registerTime;
}
public void setRegisterTime(Date registerTime) {
this.registerTime = registerTime;
}
public String getCustomerLevel() {
return customerLevel;
}
public void setCustomerLevel(String customerLevel) {
this.customerLevel = customerLevel;
}
public String getIdentityCard() {
return identityCard;
}
public void setIdentityCard(String identityCard) {
this.identityCard = identityCard;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.entity;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* @ClassName: 场景分类表
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
@TableName("t_scene_category")
@ApiModel
@Data
public class SceneCategory implements Serializable {
private static final long serialVersionUID = -6098559795341556267L;
/**
* 场景分类id
*/
@TableId(value = "scene_id", type = IdType.AUTO)
@ApiModelProperty(value = "场景分类id")
private Long sceneId;
/**
* 分类名称
*/
@TableField("scene_name")
@ApiModelProperty(value = "分类名称")
private String sceneName;
/**
* 父级分类id
*/
@TableField("parent_id")
@ApiModelProperty(value = "父级分类id")
private Long parentId;
/**
* 是否为子节点:Y是,N否
*/
@TableField("if_child")
@ApiModelProperty(value = "是否为子节点")
private String ifChild;
/**
* 创建时间
*/
@TableField("cre_time")
@ApiModelProperty(value = "创建时间")
private Date creTime;
@TableField("cre_person")
@ApiModelProperty(value = "创建人")
private String crePerson;
/**
* 更新时间
*/
@TableField("upt_time")
@ApiModelProperty(value = "更新时间")
private Date uptTime;
@TableField("del_flag")
@ApiModelProperty(value = "是否删除")
private String delFlag;
}
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName: 商品-场景分类关系表
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
@TableName("t_scene_goods_category")
@Data
@ApiModel
public class SceneGoodsCategory implements Serializable {
private static final long serialVersionUID = 7794764423295187797L;
@TableId(value = "scene_category_id", type = IdType.AUTO)
private Long sceneCategoryId;
@TableField("scene_id")
private Long sceneId;
@TableField("category_id")
private Long categoryId;
@TableField("del_flag")
private String delFlag;
}
...@@ -3,11 +3,15 @@ package com.jz.dm.mall.moduls.mapper; ...@@ -3,11 +3,15 @@ package com.jz.dm.mall.moduls.mapper;
import java.util.List; import java.util.List;
import java.util.Map; import java.util.Map;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
import org.apache.ibatis.annotations.Param;
/** /**
...@@ -73,4 +77,10 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> { ...@@ -73,4 +77,10 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> {
*/ */
public void insertBatch(List<DataGoods> dataGoodses)throws Exception; public void insertBatch(List<DataGoods> dataGoodses)throws Exception;
/**
* 获取商品详情
* @param dataGoodsId
* @return
*/
DataGoodsApiDto selectByDetails(@Param("dataGoodsId") Long dataGoodsId);
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.mapper; ...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.common.bean.MallCustomerApiDto; import com.jz.common.bean.MallCustomerApiDto;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginByVSSReq;
import com.jz.dm.mall.moduls.entity.MallCustomer; import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.entity.MallMenu; import com.jz.dm.mall.moduls.entity.MallMenu;
import com.jz.dm.mall.moduls.entity.MallUserRole; import com.jz.dm.mall.moduls.entity.MallUserRole;
...@@ -89,4 +90,11 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> { ...@@ -89,4 +90,11 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
* @return * @return
*/ */
MallCustomerApiDto selectByUser(Map map); MallCustomerApiDto selectByUser(Map map);
/**
* 查询vss用户
* @param req
* @return
*/
MallCustomerApiDto selectByVSS(LoginByVSSReq req);
} }
\ No newline at end of file
...@@ -36,18 +36,14 @@ public interface OrderDao extends BaseMapper<Order> { ...@@ -36,18 +36,14 @@ public interface OrderDao extends BaseMapper<Order> {
*/ */
void updateTokenAndSalt(Order order); void updateTokenAndSalt(Order order);
/**
* 重置盐值
* @param order
*/
void updateSalt(Order order);
IPage<OrderBySellerDto> queryPageListBySeller(IPage<OrderBySellerDto> page, @Param("ew") QueryWrapper<OrderBySellerDto> query); IPage<OrderBySellerDto> queryPageListBySeller(IPage<OrderBySellerDto> page, @Param("ew") QueryWrapper<OrderBySellerDto> query);
PurchaserUserCenterDto getMoneyAndOrderTotalDto(Map map); PurchaserUserCenterDto getMoneyAndOrderTotalDto(Map map);
List<Map<String, String>> getApiKey(@Param(value = "customerId") Long customerId); List<Map<String, String>> getApiKey(@Param(value = "departmentId") Long departmentId);
List<OrderByPurchaserDto> queryPageListByPurchaser(Map<String, Object> param); List<OrderByPurchaserDto> queryPageListByPurchaser(Map<String, Object> param);
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.entity.SceneCategory;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
public interface SceneCategoryDao extends BaseMapper<SceneCategory> {
}
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.entity.SceneGoodsCategory;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
public interface SceneGoodsCategoryDao extends BaseMapper<SceneGoodsCategory> {
}
...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.service; ...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.service;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyAddReq; import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyAddReq;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyEditReq;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq; import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -52,4 +53,11 @@ public interface CompanyAuthService { ...@@ -52,4 +53,11 @@ public interface CompanyAuthService {
Result getProvince(); Result getProvince();
Result getCity(String provinceCode,String cityCode); Result getCity(String provinceCode,String cityCode);
/**
* 重新认证企业
* @param req
* @return
*/
Result editCompany(CompanyEditReq req);
} }
package com.jz.dm.mall.moduls.service; package com.jz.dm.mall.moduls.service;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataApiDetailsReq;
/** /**
...@@ -14,8 +14,8 @@ public interface DataGoodsApiService { ...@@ -14,8 +14,8 @@ public interface DataGoodsApiService {
/** /**
* 根据主键查询商品api详情 * 根据主键查询商品api详情
* @param id * @param req
* @return * @return
*/ */
Result selectById(Long id); Result findByDetails(DataApiDetailsReq req);
} }
\ No newline at end of file
...@@ -11,6 +11,16 @@ import com.jz.common.utils.Result; ...@@ -11,6 +11,16 @@ import com.jz.common.utils.Result;
public interface DataGoodsCategoryService { public interface DataGoodsCategoryService {
/**
* 查询所有的一级分类
* @return
*/
Result findCategory(); Result findCategory();
/**
* 查询所有的场景
* @return
*/
Result findScene();
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.service; package com.jz.dm.mall.moduls.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse; import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse; import com.jz.common.bean.PageInfoResponse;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsDto;
......
package com.jz.dm.mall.moduls.service; package com.jz.dm.mall.moduls.service;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.dto.CustomerDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest; import com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginByVSSReq;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginRequest; import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginRequest;
import com.jz.dm.mall.moduls.entity.MallCustomer; import com.jz.dm.mall.moduls.entity.MallCustomer;
...@@ -72,6 +74,20 @@ public interface MallCustomerService { ...@@ -72,6 +74,20 @@ public interface MallCustomerService {
*/ */
Result loginByUser(LoginRequest customer); Result loginByUser(LoginRequest customer);
/**
* vss系统登陆
* @param req
* @return
*/
Result loginByVss(LoginByVSSReq req) throws ResponseException;
/**
* 获取登陆信息
* @return
*/
Result getUserMessage();
// /** // /**
// * 忘记密码 // * 忘记密码
// * @param customer // * @param customer
......
...@@ -46,12 +46,6 @@ public interface OrderService { ...@@ -46,12 +46,6 @@ public interface OrderService {
*/ */
Map getApiInterfaceDetail(Map params) throws Exception; Map getApiInterfaceDetail(Map params) throws Exception;
/**
* 重置盐值
* @param req
* @return
*/
Result updateSalt(SaltResetReq req);
/** /**
* 订单管理列表(分页查询)--卖方 * 订单管理列表(分页查询)--卖方
...@@ -83,4 +77,11 @@ public interface OrderService { ...@@ -83,4 +77,11 @@ public interface OrderService {
* @return * @return
*/ */
Result getLogDetails(LogInfoListReq req); Result getLogDetails(LogInfoListReq req);
/**
* 重置盐值
* @param req
* @return
*/
Result updateSalt(SaltResetReq req);
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.service;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
public interface SceneCategoryService {
}
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.common.bean.MallCustomerApiDto; import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant; import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.entity.Department; import com.jz.common.entity.Department;
import com.jz.common.enums.AuditStatusEnum;
import com.jz.common.enums.DelFlagEnum;
import com.jz.common.exception.ResponseException; import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.dm.mall.moduls.controller.company.bean.dto.CityAndAreaDto; import com.jz.dm.mall.moduls.controller.company.bean.dto.CityAndAreaDto;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyEditReq;
import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq; import com.jz.dm.mall.moduls.controller.company.bean.req.CompanyUpdateReq;
import com.jz.dm.mall.moduls.controller.company.bean.dto.CompanyInfoDto; import com.jz.dm.mall.moduls.controller.company.bean.dto.CompanyInfoDto;
import com.jz.dm.mall.moduls.entity.*; import com.jz.dm.mall.moduls.entity.*;
...@@ -222,6 +226,29 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -222,6 +226,29 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return Result.of_success(listProviceName); return Result.of_success(listProviceName);
} }
/**
* 重新认证企业
*
* @param req
* @return
*/
@Override
public Result editCompany(CompanyEditReq req) {
QueryWrapper queryWrapper = new QueryWrapper();
queryWrapper.eq("unified_credit_code",req.getUnifiedCreditCode());
queryWrapper.eq("del_flag", DelFlagEnum.NO.getValue());
queryWrapper.eq("audit_status", AuditStatusEnum.WTG.getValue());
Department department = departmentDao.selectOne(queryWrapper);
if (department != null) {
department.setAuditStatus(AuditStatusEnum.DSH.getValue());
if(departmentDao.updateById(department) != 1) {
return Result.of_error(ResultMsg.UPDATE_FAIL);
}
return Result.of_success(ResultMsg.UPDATE_SUCCESS);
}
return Result.of_error(ResultMsg.DATA_NOT_FOUND);
}
/** /**
* 保存企业信息 * 保存企业信息
* *
......
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.HttpsUtilsTest;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataApiDetailsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataDetailsDto;
import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto; import com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataApiDetailsReq;
import com.jz.dm.mall.moduls.mapper.DataGoodsApiDao; import com.jz.dm.mall.moduls.mapper.DataGoodsApiDao;
import com.jz.dm.mall.moduls.mapper.DataGoodsDao;
import com.jz.dm.mall.moduls.service.DataGoodsApiService; import com.jz.dm.mall.moduls.service.DataGoodsApiService;
import org.springframework.beans.BeanUtils; import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.util.StringUtils;
import java.math.BigDecimal;
import java.math.RoundingMode;
import java.text.DecimalFormat;
import java.util.ArrayList; import java.util.ArrayList;
import java.util.HashMap; import java.util.HashMap;
import java.util.List; import java.util.List;
...@@ -31,7 +33,11 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService { ...@@ -31,7 +33,11 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
@Autowired @Autowired
private DataGoodsApiDao tDataGoodsApiDao; private DataGoodsApiDao tDataGoodsApiDao;
@Autowired
private DataGoodsDao dataGoodsDao;
@Value("${gateway.getApiDetail}")
private String getApiDetail;
/** /**
* 根据主键查询商品api详情 * 根据主键查询商品api详情
...@@ -39,54 +45,120 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService { ...@@ -39,54 +45,120 @@ public class DataGoodsApiServiceImpl implements DataGoodsApiService {
* @param id * @param id
* @return * @return
*/ */
// @Override
// public Result selectById(Long id) {
//
// List<DataGoodsApiDto> dataGoodsApiDto = tDataGoodsApiDao.selectById(id);
// if (dataGoodsApiDto.size() == 0) {
// return Result.error(StatusCode.ERROR, "查询异常!");
// }
// List<DataGoodsApiDto> list1 = new ArrayList<>();
// List<DataGoodsApiDto> list2 = new ArrayList<>();
// List<DataGoodsApiDto> list3 = new ArrayList<>();
// Map<String, Object> map = new HashMap<>();
//
// for (DataGoodsApiDto goodsApiDto : dataGoodsApiDto) {
// if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("01")) {
// list1.add(goodsApiDto);
// }
// if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("02")) {
// list2.add(goodsApiDto);
// }
// if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("03")) {
// list3.add(goodsApiDto);
// }
// if (!StringUtils.isEmpty(goodsApiDto.getRequestExample())) {
// map.put("requestExample", goodsApiDto.getRequestExample()); // 请求示例
// }
// if (!StringUtils.isEmpty(goodsApiDto.getReturnDataExample())) {
// map.put("returnDataExample", goodsApiDto.getReturnDataExample()); // 响应示例
// }
// }
// // 商品详情
// DataGoodsApiDto goods = dataGoodsApiDto.get(0);
// DataDetailsDto data = new DataDetailsDto();
// DecimalFormat df = new DecimalFormat("#0.00");
// String str = df.format(goods.getDataPrice());
// BigDecimal bd = new BigDecimal(str).setScale(2, RoundingMode.HALF_UP);
// data.setDataPrice(bd);
// BeanUtils.copyProperties(goods, data);
// map.put("dataInfo", data);
//
// // 商品参数
// map.put("pubParam", list1); // 公共参数
// map.put("reqParam", list2); // 请求参数
// map.put("resParam", list3); // 响应参数
//
// Result result = new Result();
// result.setData(map);
// return Result.of_success(ResultMsg.SUCCESS, result);
// }
/**
* 根据主键查询商品api详情
*
* @param req
* @return
*/
@Override @Override
public Result selectById(Long id) { public Result findByDetails(DataApiDetailsReq req) {
List<DataGoodsApiDto> dataGoodsApiDto = tDataGoodsApiDao.selectById(id); DataGoodsApiDto dataGoodsApiDto = dataGoodsDao.selectByDetails(req.getDataGoodsId());
if (dataGoodsApiDto.size() == 0) { if (dataGoodsApiDto == null) {
return Result.error(StatusCode.ERROR, "查询异常!"); return Result.of_error(ResultMsg.DATA_NOT_FOUND);
} }
List<DataGoodsApiDto> list1 = new ArrayList<>(); // 获取api详情
List<DataGoodsApiDto> list2 = new ArrayList<>(); String s = HttpsUtilsTest.submitPost(getApiDetail, JSON.toJSONString(req));
List<DataGoodsApiDto> list3 = new ArrayList<>(); JSONObject params = JSONObject.parseObject(s);
Map<String, Object> map = new HashMap<>(); if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))) {
return Result.of_error("获取api详情失败!");
for (DataGoodsApiDto goodsApiDto : dataGoodsApiDto) { }
if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("01")) { DataApiDetailsDto dataDetailsDto = JSONObject.parseObject(params.getString("data"), DataApiDetailsDto.class);
list1.add(goodsApiDto); // 获取请求参数
} List<Map<String, String>> requestParam = getRequestParam(dataDetailsDto.getRequestParam());
if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("02")) { if (requestParam != null) {
list2.add(goodsApiDto); dataGoodsApiDto.setRequestParam(requestParam);
} }
if (goodsApiDto.getParamsDiffNum()!= null && goodsApiDto.getParamsDiffNum().equals("03")) { List<Map<String, String>> responseParam = getRequestParam(dataDetailsDto.getResponseParam());
list3.add(goodsApiDto); if (responseParam != null) {
} dataGoodsApiDto.setResponseParam(responseParam);
if (!StringUtils.isEmpty(goodsApiDto.getRequestExample())) {
map.put("requestExample", goodsApiDto.getRequestExample()); // 请求示例
}
if (!StringUtils.isEmpty(goodsApiDto.getReturnDataExample())) {
map.put("returnDataExample", goodsApiDto.getReturnDataExample()); // 响应示例
}
} }
// 商品详情 // 赋值商品详情参数
DataGoodsApiDto goods = dataGoodsApiDto.get(0); BeanUtils.copyProperties(dataDetailsDto, dataGoodsApiDto);
DataDetailsDto data = new DataDetailsDto(); return Result.ok(dataGoodsApiDto);
DecimalFormat df = new DecimalFormat("#0.00"); }
String str = df.format(goods.getDataPrice());
BigDecimal bd = new BigDecimal(str).setScale(2, RoundingMode.HALF_UP);
data.setDataPrice(bd);
BeanUtils.copyProperties(goods, data);
map.put("dataInfo", data);
// 商品参数
map.put("pubParam", list1); // 公共参数
map.put("reqParam", list2); // 请求参数
map.put("resParam", list3); // 响应参数
Result result = new Result();
result.setData(map);
return Result.of_success(ResultMsg.SUCCESS, result);
}
/**
* 获取请求参数
* @param result
* @return
*/
private List<Map<String, String>> getRequestParam(String result) {
List<Map<String, String>> param = (List<Map<String, String>>) JSONArray.parse(result);
List<Map<String, String>> resultParam = new ArrayList<>();
for (Map<String, String> reqMap : param) {
Map<String, String> map = new HashMap();
for (Map.Entry entry : reqMap.entrySet()) {
if (entry.getKey().equals("name")) {
map.put("paramsName", entry.getKey().toString());
}
if (entry.getKey().equals("type")) {
map.put("paramsType", entry.getKey().toString());
}
if (entry.getKey().equals("requird")) {
map.put("ifRequird",entry.getKey().toString());
}
if (entry.getKey().equals("desc")) {
map.put("paramsDesc", entry.getKey().toString());
}
}
resultParam.add(map);
}
return resultParam;
}
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.enums.DelFlagEnum;
import com.jz.common.enums.YNEnum;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.entity.DataGoodsCategory; import com.jz.dm.mall.moduls.entity.DataGoodsCategory;
import com.jz.dm.mall.moduls.entity.SceneCategory;
import com.jz.dm.mall.moduls.mapper.DataGoodsCategoryDao; import com.jz.dm.mall.moduls.mapper.DataGoodsCategoryDao;
import com.jz.dm.mall.moduls.mapper.SceneCategoryDao;
import com.jz.dm.mall.moduls.service.DataGoodsCategoryService; import com.jz.dm.mall.moduls.service.DataGoodsCategoryService;
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,6 +28,10 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService { ...@@ -23,6 +28,10 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
@Autowired @Autowired
private DataGoodsCategoryDao categoryDao; private DataGoodsCategoryDao categoryDao;
@Autowired
private SceneCategoryDao sceneCategoryDao;
/** /**
* 查询所有的商品分类 * 查询所有的商品分类
* *
...@@ -30,30 +39,30 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService { ...@@ -30,30 +39,30 @@ public class DataGoodsCategoryServiceImpl implements DataGoodsCategoryService {
*/ */
@Override @Override
public Result findCategory() { public Result findCategory() {
//1、查出所有分类 QueryWrapper<DataGoodsCategory> queryWrapper = new QueryWrapper<>();
List<DataGoodsCategory> entities = categoryDao.selectByList(); queryWrapper.eq("parent_id", "0");
queryWrapper.eq("if_child", YNEnum.NO.getValue());
// 找到所有的一级分类 queryWrapper.eq("del_flag", DelFlagEnum.NO.getValue());
List<DataGoodsCategory> level1Menus = entities.stream().filter(categoryEntity -> categoryEntity.getParentId() == 0 && categoryEntity.getIfChild().equals("N") List<DataGoodsCategory> dataGoodsCategories = categoryDao.selectList(queryWrapper);
// categoryEntity -> if (dataGoodsCategories != null) {
// categoryEntity.getParentId() == 0 && categoryEntity.getIfChild().equals("N") return Result.ok(dataGoodsCategories);
).map((menu)->{ }
menu.setChildren(getChildrens(menu,entities)); return Result.of_error(ResultMsg.DATA_NOT_FOUND);
return menu;
}).collect(Collectors.toList());
return Result.of_success(ResultMsg.SUCCESS, level1Menus);
} }
private List<DataGoodsCategory> getChildrens(DataGoodsCategory root,List<DataGoodsCategory> all) { /**
* 查询所有的场景
List<DataGoodsCategory> children = all.stream().filter(categoryEntity -> { *
return categoryEntity.getParentId() == root.getCategoryId() && categoryEntity.getIfChild().equals("Y"); * @return
}).map(categoryEntity -> { */
//1、找到子菜单,同时递归调用 @Override
categoryEntity.setChildren(getChildrens(categoryEntity, all)); public Result findScene() {
return categoryEntity; QueryWrapper<SceneCategory> queryWrapper = new QueryWrapper<>();
}).collect(Collectors.toList()); queryWrapper.eq("del_flag", DelFlagEnum.NO.getValue());
List<SceneCategory> sceneCategories = sceneCategoryDao.selectList(queryWrapper);
return children; if (sceneCategories != null) {
return Result.ok(sceneCategories);
}
return Result.of_error(ResultMsg.DATA_NOT_FOUND);
} }
} }
\ No newline at end of file
...@@ -2,6 +2,9 @@ package com.jz.dm.mall.moduls.service.impl; ...@@ -2,6 +2,9 @@ package com.jz.dm.mall.moduls.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo; import com.github.pagehelper.PageInfo;
import com.jz.common.bean.BaseBeanResponse; import com.jz.common.bean.BaseBeanResponse;
...@@ -11,6 +14,8 @@ import com.jz.common.bean.PageInfoResponse; ...@@ -11,6 +14,8 @@ import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants; import com.jz.common.constant.Constants;
import com.jz.common.constant.RedisMessageConstant; import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.enums.DataGoodsByRoleEnum;
import com.jz.common.enums.DelFlagEnum;
import com.jz.common.exception.ResponseException; import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.HttpsUtilsTest; import com.jz.common.utils.HttpsUtilsTest;
...@@ -69,61 +74,49 @@ public class DataGoodsServiceImpl implements DataGoodsService { ...@@ -69,61 +74,49 @@ public class DataGoodsServiceImpl implements DataGoodsService {
private DataGoodsApiDao tDataGoodsApiDao; private DataGoodsApiDao tDataGoodsApiDao;
@Value("${domain.apigateway}") @Value("${gateway.apigateway}")
private String apiGateway; private String apiGateway;
@Value("${token.dataBank}") @Value("${token.dataBank}")
private String dataBank; private String dataBank;
/**条件查询所有数据商品 /**条件查询所有数据商品
* @param dataGoodsListRequest * @param req
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
*/ */
@Override @Override
public PageInfoResponse<DataGoodsListDto> findList(DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) public PageInfoResponse findList(DataGoodsListRequest req, HttpServletRequest httpRequest)
throws Exception { throws Exception {
PageInfoResponse<DataGoodsListDto> pageInfoResponse = new PageInfoResponse<>(); PageInfoResponse<DataGoodsListDto> pageInfoResponse = new PageInfoResponse<>();
Map<String, Object> param = new HashMap<>(); Map<String, Object> map = new HashMap<>();
//商品分类id(行业) if (StringUtils.isNotBlank(req.getDataName())) {
if (dataGoodsListRequest.getCategoryId() != null) { map.put("dataName", req.getDataName());
param.put("categoryId", dataGoodsListRequest.getCategoryId());
} }
//数据商品名称 if (req.getCategoryId() != null) {
if (StringUtils.isNotEmpty(dataGoodsListRequest.getDataName())) { map.put("categoryId", req.getCategoryId());
param.put("dataName", dataGoodsListRequest.getDataName());
} }
//数据类型:01api,02数据包 if (req.getSceneId() != null) {
if (StringUtils.isNotEmpty(dataGoodsListRequest.getDataType())) { map.put("sceneId", req.getSceneId());
param.put("dataType", dataGoodsListRequest.getDataType());
} }
// if (getCustomer() != null) {
//价格类型:01免费,02收费 // map.put("customerId", getCustomer().getCustomerId());
if (StringUtils.isNotEmpty(dataGoodsListRequest.getPriceType())) { // }
param.put("priceType", dataGoodsListRequest.getPriceType()); if (getCustomer() != null) {
} map.put("departmentId", getCustomer().getDepartmentId());
//更新时间排序
if (dataGoodsListRequest.getUptTime() != null) {
param.put("uptTime", dataGoodsListRequest.getUptTime());
}
// 使用人数
if (dataGoodsListRequest.getUsePerson() != null) {
param.put("usePerson", dataGoodsListRequest.getUsePerson());
} }
// 综合排序 if (getCustomer() == null) {
if (StringUtils.isNotEmpty(dataGoodsListRequest.getSynthesizeRank())) { map.put("roleId", DataGoodsByRoleEnum.logOutUser.getValue());
param.put("synthesizeRank", dataGoodsListRequest.getSynthesizeRank()); }else if (getCustomer().getCustomerId() != null) {
} map.put("roleId", DataGoodsByRoleEnum.unverifiedUser.getValue());
}else if (getCustomer().getDepartmentId() != null) {
PageHelper.startPage(dataGoodsListRequest.getPageNum(), dataGoodsListRequest.getPageSize()); map.put("roleId", DataGoodsByRoleEnum.authenticatedUser.getValue());
List<DataGoodsListDto> list = dataGoodsDao.findList(param);
for (DataGoodsListDto dataGoodsListDto : list) {
dataGoodsListDto.getDataPrice().setScale(3);
} }
PageHelper.startPage(req.getPageNum(), req.getPageSize());
List<DataGoodsListDto> list = dataGoodsDao.findList(map);
PageInfo<DataGoodsListDto> pageInfo = new PageInfo<>(list); PageInfo<DataGoodsListDto> pageInfo = new PageInfo<>(list);
pageInfoResponse.setCode(Constants.SUCCESS_CODE); pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功"); pageInfoResponse.setMessage("查询成功");
pageInfoResponse.setData(pageInfo); pageInfoResponse.setData(pageInfo);
...@@ -398,4 +391,12 @@ public class DataGoodsServiceImpl implements DataGoodsService { ...@@ -398,4 +391,12 @@ public class DataGoodsServiceImpl implements DataGoodsService {
return encrypt; return encrypt;
} }
/**
* 获取用户
* @return
*/
public MallCustomerApiDto getCustomer() {
MallCustomerApiDto customer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
return customer;
}
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSON;
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.JSONObject; import com.alibaba.fastjson.JSONObject;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
...@@ -59,14 +60,16 @@ public class OrderServiceImpl implements OrderService { ...@@ -59,14 +60,16 @@ public class OrderServiceImpl implements OrderService {
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
@Value("${domain.gatewayUpSalt}")
private String gatewayUpSalt;
@Value("${domain.gatewayOrderLogDetails}")
@Value("${gateway.gatewayOrderLogDetails}")
private String gatewayOrderLogDetails; private String gatewayOrderLogDetails;
@Value("${domain.gatewayOrderLogNumError}") @Value("${gateway.gatewayOrderLogNumError}")
private String gatewayOrderLogNumError; private String gatewayOrderLogNumError;
@Value("${gateway.gatewayUpSalt}")
private String gatewayUpSalt;
/** /**
* 订单管理列表(分页查询) * 订单管理列表(分页查询)
* *
...@@ -116,7 +119,6 @@ public class OrderServiceImpl implements OrderService { ...@@ -116,7 +119,6 @@ public class OrderServiceImpl implements OrderService {
@Override @Override
public OrderDto getOrderDetail(String orderId) throws Exception { public OrderDto getOrderDetail(String orderId) throws Exception {
OrderDto orderDto = null; OrderDto orderDto = null;
if (StringUtils.isNotEmpty(orderId)) { if (StringUtils.isNotEmpty(orderId)) {
orderDto = orderDao.getOrderDetail(orderId); orderDto = orderDao.getOrderDetail(orderId);
if (orderDto != null) { if (orderDto != null) {
...@@ -150,41 +152,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -150,41 +152,7 @@ public class OrderServiceImpl implements OrderService {
return returnMap; return returnMap;
} }
/**
* 重置盐值
*
* @param req
* @return
*/
@Override
public Result updateSalt(SaltResetReq req) {
// 获取当前用户
MallCustomerApiDto customer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
//调用gatway
JSONObject object = new JSONObject();
object.put("authCode", req.getGoodsToken());
object.put("createUser", customer.getCustomerName());
String s = HttpsUtilsTest.submitPost(gatewayUpSalt, object.toString());
//处理返回的参数
JSONObject params = JSONObject.parseObject(s);
if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))) {
return Result.error("修改失败!");
}
String data = params.getString("data");
JSONObject dataParam = JSONObject.parseObject(data);
String salt = dataParam.getString("salt");
// 修改参数
Order order = new Order();
order.setSaltValue(salt);
order.setOrderId(req.getId());
order.setUptTime(DateUtils.getToday());
order.setUptPerson(customer.getCustomerId() + "");
orderDao.updateSalt(order);
Map map = new HashMap();
map.put("salt", salt);
return Result.of_success(ResultMsg.SUCCESS, salt);
}
/** /**
* 订单管理列表(分页查询)--卖方 * 订单管理列表(分页查询)--卖方
* @param req * @param req
...@@ -264,7 +232,7 @@ public class OrderServiceImpl implements OrderService { ...@@ -264,7 +232,7 @@ public class OrderServiceImpl implements OrderService {
@Override @Override
public Result<PageInfoResponse<OrderByPurchaserDto>> queryPageListByPurchaser(OrderRequest req) { public Result<PageInfoResponse<OrderByPurchaserDto>> queryPageListByPurchaser(OrderRequest req) {
// 调用gateway,获取调用数/错误率 // 调用gateway,获取调用数/错误率
List<Map<String, String>> reqList = orderDao.getApiKey(getCustomer().getCustomerId()); List<Map<String, String>> reqList = orderDao.getApiKey(getCustomer().getDepartmentId());
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("reqList", reqList); object.put("reqList", reqList);
String s = HttpsUtilsTest.submitPost(gatewayOrderLogNumError, object.toString()); String s = HttpsUtilsTest.submitPost(gatewayOrderLogNumError, object.toString());
...@@ -273,7 +241,6 @@ public class OrderServiceImpl implements OrderService { ...@@ -273,7 +241,6 @@ public class OrderServiceImpl implements OrderService {
if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))) { if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))) {
return Result.of_error("获取参数失败!"); return Result.of_error("获取参数失败!");
} }
PageInfoResponse<OrderByPurchaserDto> pageInfoResponse = new PageInfoResponse<>();
Map<String, Object> param = new HashMap<>(); Map<String, Object> param = new HashMap<>();
if (StringUtils.isNotBlank(req.getDataName())) { if (StringUtils.isNotBlank(req.getDataName())) {
param.put("dataName", req.getDataName()); param.put("dataName", req.getDataName());
...@@ -281,10 +248,13 @@ public class OrderServiceImpl implements OrderService { ...@@ -281,10 +248,13 @@ public class OrderServiceImpl implements OrderService {
if (StringUtils.isNotBlank(req.getPriceType())) { if (StringUtils.isNotBlank(req.getPriceType())) {
param.put("priceType", req.getPriceType()); param.put("priceType", req.getPriceType());
} }
if (getCustomer().getCustomerId() != null) { if (StringUtils.isNotBlank(req.getGoodsStatus())) {
param.put("customerId", getCustomer().getCustomerId()); param.put("goodsStatus", req.getGoodsStatus());
}
if (getCustomer().getCustomerId() != null && getCustomer().getDepartmentId() != null) {
param.put("departmentId", getCustomer().getDepartmentId());
}else { }else {
return Result.of_error("用户未登录,请登录!"); return Result.of_error("用户未认证,请认证!");
} }
PageHelper.startPage(req.getPageNum(), req.getPageSize()); PageHelper.startPage(req.getPageNum(), req.getPageSize());
List<OrderByPurchaserDto> list = orderDao.queryPageListByPurchaser(param); List<OrderByPurchaserDto> list = orderDao.queryPageListByPurchaser(param);
...@@ -299,7 +269,6 @@ public class OrderServiceImpl implements OrderService { ...@@ -299,7 +269,6 @@ public class OrderServiceImpl implements OrderService {
} }
} }
PageInfo<OrderByPurchaserDto> pageInfo = new PageInfo<>(list); PageInfo<OrderByPurchaserDto> pageInfo = new PageInfo<>(list);
return Result.of_success(pageInfo); return Result.of_success(pageInfo);
...@@ -332,7 +301,45 @@ public class OrderServiceImpl implements OrderService { ...@@ -332,7 +301,45 @@ public class OrderServiceImpl implements OrderService {
if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))){ if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))){
return Result.of_error("获取日志详情失败!"); return Result.of_error("获取日志详情失败!");
} }
return Result.ok(params.get("data")); JSONObject object = JSONObject.parseObject(params.getString("data"));
List<ApiReqLogDto> records = JSONObject.parseArray(object.getString("records"), ApiReqLogDto.class);
return Result.ok(records);
}
/**
* 重置盐值
*
* @param req
* @return
*/
@Override
public Result updateSalt(SaltResetReq req) {
//调用gatway
JSONObject object = new JSONObject();
object.put("authCode", req.getGoodsToken());
object.put("createUser", getCustomer().getCustomerId());
String s = HttpsUtilsTest.submitPost(gatewayUpSalt, object.toString());
//处理返回的参数
JSONObject params = JSONObject.parseObject(s);
if (!params.get("code").equals(200) || org.springframework.util.StringUtils.isEmpty(params.get("data"))) {
return Result.error("修改失败!");
}
String data = params.getString("data");
JSONObject dataParam = JSONObject.parseObject(data);
String salt = dataParam.getString("salt");
// 修改参数
Order order = new Order();
order.setSaltValue(salt);
order.setOrderId(req.getId());
order.setUptTime(DateUtils.getToday());
order.setUptPerson(getCustomer().getCustomerId() + "");
if (orderDao.updateById(order) != 1) {
return Result.of_error(ResultMsg.UPDATE_FAIL);
}
Map map = new HashMap();
map.put("salt", salt);
return Result.of_success(ResultMsg.SUCCESS, salt);
} }
public MallCustomerApiDto getCustomer() { public MallCustomerApiDto getCustomer() {
......
...@@ -56,7 +56,7 @@ public class PayServiceImpl implements PayService { ...@@ -56,7 +56,7 @@ public class PayServiceImpl implements PayService {
//@Autowired //@Autowired
//private HttpsUtils httpsUtils; //private HttpsUtils httpsUtils;
@Value("${domain.gatewayGetAuth}") @Value("${gateway.gatewayGetAuth}")
private String gatewayGetAuth; private String gatewayGetAuth;
/** /**
......
package com.jz.dm.mall.moduls.service.impl;
import com.jz.dm.mall.moduls.service.SceneCategoryService;
import org.springframework.stereotype.Service;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/3
* @Version:
*/
@Service("SceneCategoryService")
public class SceneCategoryServiceImpl implements SceneCategoryService {
}
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.aliyuncs.CommonRequest;
import com.aliyuncs.CommonResponse;
import com.aliyuncs.DefaultAcsClient;
import com.aliyuncs.IAcsClient;
import com.aliyuncs.exceptions.ClientException;
import com.aliyuncs.exceptions.ServerException;
import com.aliyuncs.http.MethodType;
import com.aliyuncs.profile.DefaultProfile;
import com.jz.common.constant.RedisMessageConstant; import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.SMSUtils; import com.jz.common.utils.SMSUtils;
import com.jz.common.utils.StatusCode;
import com.jz.common.utils.ValidateCodeUtils; import com.jz.common.utils.ValidateCodeUtils;
import com.jz.dm.mall.moduls.service.ValidateCodeService; import com.jz.dm.mall.moduls.service.ValidateCodeService;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
......
...@@ -75,12 +75,13 @@ logging: ...@@ -75,12 +75,13 @@ logging:
level: level:
com.jz.dm.mall: debug com.jz.dm.mall: debug
# 调用gateway接口路径 # 调用gateway接口路径
domain: gateway:
gatewayGetAuth: http://47.115.53.1:8088/api/auth/mall-user-auth-api gatewayGetAuth: http://47.115.53.1:8088/api/auth/mall-user-auth-api
gatewayUpSalt: http://192.168.1.114:8088/api/auth/reset-salt
apigateway: http://127.0.0.1:8088/api/producer/addDataBankApiInfo apigateway: http://127.0.0.1:8088/api/producer/addDataBankApiInfo
gatewayOrderLogDetails: http://127.0.0.1:8088/api/logging/listApiLog gatewayOrderLogDetails: http://127.0.0.1:8088/api/logging/listApiLog
gatewayOrderLogNumError: http://127.0.0.1:8088/api/logging/queryNumberAndError gatewayOrderLogNumError: http://127.0.0.1:8088/api/logging/queryNumberAndError
getApiDetail: http://127.0.0.1:8088/api/interface/getApiDetail
gatewayUpSalt: http://127.0.0.1:8088/api/auth/reset-salt
ftp: ftp:
url: 192.168.1.141 url: 192.168.1.141
port: 21 port: 21
......
...@@ -92,10 +92,10 @@ ...@@ -92,10 +92,10 @@
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="customerId" useGeneratedKeys="true"> <!--<insert id="insert" keyProperty="customerId" useGeneratedKeys="true">-->
insert into t_mall_customer(department_id, password, customer_account, customer_name, customer_phone, customer_email, customer_address, customer_point, register_time, customer_level, identity_card, cre_time, upt_time, del_flag) <!--insert into t_mall_customer(department_id, password, customer_account, customer_name, customer_phone, customer_email, customer_address, customer_point, register_time, customer_level, identity_card, cre_time, upt_time, del_flag)-->
values (#{departmentId}, #{password}, #{customerAccount}, #{customerName}, #{customerPhone}, #{customerEmail}, #{customerAddress}, #{customerPoint}, #{registerTime}, #{customerLevel}, #{identityCard}, #{creTime}, #{uptTime}, #{delFlag}) <!--values (#{departmentId}, #{password}, #{customerAccount}, #{customerName}, #{customerPhone}, #{customerEmail}, #{customerAddress}, #{customerPoint}, #{registerTime}, #{customerLevel}, #{identityCard}, #{creTime}, #{uptTime}, #{delFlag})-->
</insert> <!--</insert>-->
<insert id="insertBatch" keyProperty="customerId" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="customerId" useGeneratedKeys="true">
insert into t_mall_customer(department_id, password, customer_account, customer_name, insert into t_mall_customer(department_id, password, customer_account, customer_name,
...@@ -293,7 +293,8 @@ ...@@ -293,7 +293,8 @@
left JOIN t_department t2 ON t1.department_id = t2.department_id left JOIN t_department t2 ON t1.department_id = t2.department_id
left JOIN t_finance_customer_assets t3 ON t3.department_id = t2.department_id left JOIN t_finance_customer_assets t3 ON t3.department_id = t2.department_id
WHERE WHERE
t1.del_flag = 'N' t1.del_flag = 'N' and
t1.customer_source = '01'
<if test="customerAccount != null"> <if test="customerAccount != null">
and t1.customer_account = #{customerAccount} and t1.customer_account = #{customerAccount}
</if> </if>
...@@ -302,4 +303,23 @@ ...@@ -302,4 +303,23 @@
</if> </if>
GROUP BY t1.customer_id GROUP BY t1.customer_id
</select> </select>
<select id="selectByVSS" resultType="com.jz.common.bean.MallCustomerApiDto">
SELECT
t1.customer_id AS customerId,
t1.department_id AS departmentId,
t1.customer_account AS customerAccount,
t3.assets_id AS assetsId,
t2.department_name as departmentName,
t1.vendor_id as vendorId
FROM
t_mall_customer t1
inner JOIN t_department t2 ON t1.department_id = t2.department_id
inner JOIN t_finance_customer_assets t3 ON t3.department_id = t2.department_id
WHERE
t1.del_flag = 'N' and
t1.customer_source = '02' and
t2.unified_credit_code = #{unifiedCreditCode}
and t1.customer_account = #{customerAccount}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -72,10 +72,10 @@ ...@@ -72,10 +72,10 @@
</select> </select>
<!--新增所有列--> <!--新增所有列-->
<insert id="insert" keyProperty="assetsId" useGeneratedKeys="true"> <!--<insert id="insert" keyProperty="assetsId" useGeneratedKeys="true">-->
insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person, del_flag) <!--insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money, cre_time, cre_person, upt_time, upt_person, del_flag)-->
values (#{departmentId}, #{useMoney}, #{frozenMoney}, #{totalMoney}, #{creTime}, #{crePerson}, #{uptTime}, #{uptPerson}, #{delFlag}) <!--values (#{departmentId}, #{useMoney}, #{frozenMoney}, #{totalMoney}, #{creTime}, #{crePerson}, #{uptTime}, #{uptPerson}, #{delFlag})-->
</insert> <!--</insert>-->
<insert id="insertBatch" keyProperty="assetsId" useGeneratedKeys="true"> <insert id="insertBatch" keyProperty="assetsId" useGeneratedKeys="true">
insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money, insert into t_finance_customer_assets(department_id, use_money, frozen_money, total_money,
......
...@@ -179,55 +179,138 @@ ...@@ -179,55 +179,138 @@
</select> </select>
<!--通过实体作为筛选条件查询--> <!--&lt;!&ndash;通过实体作为筛选条件查询&ndash;&gt;-->
<select id="findList" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto" parameterType="map"> <!--<select id="findList" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto" parameterType="map">-->
<!--SELECT-->
<!--t1.data_goods_id as dataGoodsId,-->
<!--t1.category_id as categoryId,-->
<!--t2.category_name as categoryName,-->
<!--t1.data_name as dataName,-->
<!--( CASE WHEN t1.data_type = '01' THEN 'api' WHEN t1.data_type = '02' THEN '数据包' END ) dataType,-->
<!--t1.data_label as dataLabel,-->
<!--t1.data_picture as dataPicture,-->
<!--( CASE when t1.price_type = '01' then '免费' when t1.price_type = '02' then '收费' end) priceType,-->
<!--t1.discount_price as discountPrice,-->
<!--t1.data_price as dataPrice,-->
<!--t1.price_type as pariceType,-->
<!--t2.parent_id as parentId,-->
<!--t1.year_type as yearType,-->
<!--t1.season_type as seasonType,-->
<!--t1.month_type as monthType,-->
<!--t1.second_type as secondType-->
<!--FROM-->
<!--t_data_goods t1-->
<!--INNER JOIN t_data_goods_category t2 on t1.category_id = t2.category_id-->
<!--where-->
<!--1= 1 and-->
<!--t1.del_flag = 'N' and-->
<!--t1.data_status = '02'-->
<!--<if test="categoryId != null">-->
<!--and t1.category_id = #{categoryId}-->
<!--</if>-->
<!--<if test="dataName != null and dataName != ''">-->
<!--and data_name like concat('%',#{dataName},'%')-->
<!--</if>-->
<!--<if test="dataType != null and dataType != ''">-->
<!--and data_type = #{dataType}-->
<!--</if>-->
<!--<if test="priceType != null and priceType != ''">-->
<!--and price_type = #{priceType}-->
<!--</if>-->
<!--<if test="uptTime != null ">-->
<!--ORDER BY-->
<!--t1.upt_time desc-->
<!--</if>-->
<!--<if test="usePerson != null ">-->
<!--ORDER BY-->
<!--t1.use_person desc-->
<!--</if>-->
<!--<if test="synthesizeRank != null">-->
<!--ORDER BY-->
<!--t1.upt_time,t1.use_person desc-->
<!--</if>-->
<!--</select>-->
<select id="findList" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsListDto" parameterType="map">
select
ttt.data_desc as dataDesc,
ttt.data_name as dataName,
ttt.data_goods_id as dataGoodsId,
ttt.upt_time as uptTime,
ttt.goodsToken as goodsToken,
ttt.category_id as categoryId,
ttt.scene_id as sceneId,
ttt.userNumbers as userNumbers,
ttt.api_key as apiKey
from
(
SELECT
tt.data_goods_id,
tt.data_name,
tt.data_desc,
tt.upt_time,
tt.category_id,
tt.scene_id,
tt.del_flag,
tt.api_key,
case when tt.data_goods_id in (
SELECT
t.data_goods_id
FROM
t_data_goods t
INNER JOIN t_order_goods_info t1 ON t.data_goods_id = t1.data_goods_id
INNER JOIN t_order t2 ON t1.order_id = t2.order_id
WHERE
t.del_flag = 'N'
<if test="departmentId != null">
and t2.department_id = #{departmentId}
</if>
) then '已授权' else '' end goodsToken,
(SELECT
count(t1.data_goods_id)
from
t_data_goods t1
INNER JOIN t_order_goods_info t2 on t1.data_goods_id = t2.data_goods_id
inner join t_order t3 on t2.order_id = t3.order_id
where t1.data_goods_id=tt.data_goods_id) as userNumbers
FROM
t_data_goods tt ) as ttt
INNER JOIN t_role_goods tr ON tr.data_goods_id = ttt.data_goods_id
INNER JOIN t_mall_role tmr ON tmr.role_id = tr.role_id
where
ttt.del_flag = 'N'
AND tr.del_flag = 'N'
AND tmr.role_id = #{roleId}
<if test="dataName != null and dataName != ''">
and ttt.data_name = #{dataName}
</if>
<if test="categoryId != null">
and ttt.category_id = #{categoryId}
</if>
<if test="sceneId != null">
and ttt.scene_id = #{sceneId}
</if>
order by ttt.upt_time desc
</select>
<select id="selectByDetails" resultType="com.jz.dm.mall.moduls.controller.goods.bean.dto.DataGoodsApiDto">
SELECT SELECT
t1.data_goods_id as dataGoodsId, t1.data_name as dataName,
t1.category_id as categoryId, t1.user_id as userId,
t2.category_name as categoryName, t1.upt_time as uptTime,
t1.data_name as dataName, t2.category_name as categoryName,
( CASE WHEN t1.data_type = '01' THEN 'api' WHEN t1.data_type = '02' THEN '数据包' END ) dataType, t1.year_type as yearType,
t1.data_label as dataLabel, t1.season_type as seasonType,
t1.data_picture as dataPicture, t1.month_type as monthType,
( CASE when t1.price_type = '01' then '免费' when t1.price_type = '02' then '收费' end) priceType, t1.second_type as secondType,
t1.discount_price as discountPrice, t1.goods_limited as goodsLimited,
t1.data_price as dataPrice, t1.data_desc as dataDesc,
t1.price_type as pariceType, t1.data_picture as dataPicture,
t2.parent_id as parentId, t1.price_type as priceType
t1.year_type as yearType,
t1.season_type as seasonType,
t1.month_type as monthType,
t1.second_type as secondType
FROM FROM
t_data_goods t1 t_data_goods t1
INNER JOIN t_data_goods_category t2 on t1.category_id = t2.category_id left join t_data_goods_category t2 on t1.category_id = t2.category_id
where where t1.del_flag = 'N'
1= 1 and and t1.data_goods_id = #{dataGoodsId}
t1.del_flag = 'N' and
t1.data_status = '02'
<if test="categoryId != null">
and t1.category_id = #{categoryId}
</if>
<if test="dataName != null and dataName != ''">
and data_name like concat('%',#{dataName},'%')
</if>
<if test="dataType != null and dataType != ''">
and data_type = #{dataType}
</if>
<if test="priceType != null and priceType != ''">
and price_type = #{priceType}
</if>
<if test="uptTime != null ">
ORDER BY
t1.upt_time desc
</if>
<if test="usePerson != null ">
ORDER BY
t1.use_person desc
</if>
<if test="synthesizeRank != null">
ORDER BY
t1.upt_time,t1.use_person desc
</if>
</select> </select>
</mapper> </mapper>
\ No newline at end of file
...@@ -397,21 +397,7 @@ ...@@ -397,21 +397,7 @@
where order_id = #{orderId} where order_id = #{orderId}
</update> </update>
<update id="updateSalt" parameterType="com.jz.dm.mall.moduls.entity.Order">
update t_order
<set>
<if test="saltValue != null and saltValue != ''">
salt_value = #{saltValue},
</if>
<if test="uptTime != null">
upt_time = #{uptTime},
</if>
<if test="uptPerson != null and uptPerson != ''">
upt_person = #{uptPerson},
</if>
</set>
where order_id = #{orderId}
</update>
<select id="queryPageListBySeller" resultType="com.jz.dm.mall.moduls.controller.order.bean.dto.OrderBySellerDto"> <select id="queryPageListBySeller" resultType="com.jz.dm.mall.moduls.controller.order.bean.dto.OrderBySellerDto">
SELECT SELECT
...@@ -500,28 +486,34 @@ ...@@ -500,28 +486,34 @@
<select id="queryPageListByPurchaser" resultType="com.jz.dm.mall.moduls.controller.order.bean.dto.OrderByPurchaserDto"> <select id="queryPageListByPurchaser" resultType="com.jz.dm.mall.moduls.controller.order.bean.dto.OrderByPurchaserDto">
SELECT SELECT
t1.order_id as orderId,
t3.data_goods_id as dataGoodsId,
t1.goods_token as requestToken, t1.goods_token as requestToken,
t1.api_key as apiKey, t1.api_key as apiKey,
t1.salt_value as saltValue, t1.salt_value as saltValue,
t1.price_type as priceType, t1.price_type as priceType,
t3.data_name as dataName t3.data_name as dataName,
(CASE WHEN (t1.invalid_time >= DATE_FORMAT(NOW(), '%Y-%m-%d')) THEN '01' ELSE '02' END ) goodsStatus
FROM FROM
t_order t1 t_order t1
join t_order_goods_info t2 on t1.order_id = t2.order_id join t_order_goods_info t2 on t1.order_id = t2.order_id
join t_data_goods t3 on t2.data_goods_id = t3.data_goods_id join t_data_goods t3 on t2.data_goods_id = t3.data_goods_id
where where
t1.customer_id = #{customerId} t1.department_id = #{departmentId}
<if test="dataName != null and dataName != ''"> <if test="dataName != null and dataName != ''">
and t3.data_name = #{dataName} and t3.data_name = #{dataName}
</if> </if>
<if test="priceType != null and priceType != ''"> <if test="priceType != null and priceType != ''">
and t3.price_type = #{priceType} and t1.price_type = #{priceType}
</if>
<if test="goodsStatus != null">
and (CASE WHEN (t1.invalid_time >= DATE_FORMAT(NOW(), '%Y-%m-%d')) THEN '01' ELSE '02' END ) = #{goodsStatus}
</if> </if>
GROUP BY t1.api_key GROUP BY t1.api_key
order BY t1.order_time order BY t1.order_time
</select> </select>
<select id="getApiKey" resultType="map"> <select id="getApiKey" resultType="map">
select api_key as apiKey,goods_token as requestToken from t_order where customer_id = #{customerId} select api_key as apiKey,goods_token as requestToken from t_order where department_id = #{departmentId}
</select> </select>
</mapper> </mapper>
\ No newline at end of file
package com.jz.manage.moduls.controller.customer; package com.jz.manage.moduls.controller.customer;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto; import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto;
import com.jz.manage.moduls.controller.customer.bean.request.CheckDepartmentAuditReq;
import com.jz.manage.moduls.controller.customer.bean.request.DepartmentAuditReq; import com.jz.manage.moduls.controller.customer.bean.request.DepartmentAuditReq;
import com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest; import com.jz.manage.moduls.controller.customer.bean.request.EnterpriseAuditRequest;
import com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest; import com.jz.manage.moduls.controller.customer.bean.request.SaveCustomerRequest;
...@@ -15,6 +17,7 @@ import org.springframework.util.StringUtils; ...@@ -15,6 +17,7 @@ import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
/** /**
* 企业(Department)表控制层 * 企业(Department)表控制层
...@@ -24,7 +27,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -24,7 +27,7 @@ import javax.servlet.http.HttpServletRequest;
*/ */
@RestController @RestController
@RequestMapping("department") @RequestMapping("department")
@Api(tags = "企业信息管理--controller") @Api(tags = "平台--企业管理--controller")
public class DepartmentController extends BaseController { public class DepartmentController extends BaseController {
/** /**
* 服务对象 * 服务对象
...@@ -40,9 +43,14 @@ public class DepartmentController extends BaseController { ...@@ -40,9 +43,14 @@ public class DepartmentController extends BaseController {
* @throws Exception * @throws Exception
*/ */
@PostMapping(value = "/findList") @PostMapping(value = "/findList")
@ApiOperation(value = "条件分页查询企业审核信息") @ApiOperation(value = "企业审核--条件分页查询企业审核信息")
public Result<IPage<EnterpriseAuditDto>> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception { public Result<IPage<EnterpriseAuditDto>> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception {
return departmentService.findList(auditRequest, req); try {
return departmentService.findList(auditRequest, req);
}catch (Exception e) {
e.printStackTrace();
return Result.of_error(ResultMsg.DATA_NOT_FOUND);
}
} }
/** /**
...@@ -52,7 +60,7 @@ public class DepartmentController extends BaseController { ...@@ -52,7 +60,7 @@ public class DepartmentController extends BaseController {
* @return * @return
*/ */
@GetMapping(value = "/getDepartment/{id}") @GetMapping(value = "/getDepartment/{id}")
@ApiOperation(value = "主键查询用户企业详情信息") @ApiOperation(value = "企业审核--主键查询用户企业详情信息")
public Result selectById(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{ public Result selectById(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{
if (id != null) { if (id != null) {
return departmentService.selectById(id); return departmentService.selectById(id);
...@@ -66,14 +74,20 @@ public class DepartmentController extends BaseController { ...@@ -66,14 +74,20 @@ public class DepartmentController extends BaseController {
* @return * @return
*/ */
@PostMapping(value = "/audit") @PostMapping(value = "/audit")
@ApiOperation(value = "企业审核") @ApiOperation(value = "企业审核--审核")
public Result audit(@RequestBody DepartmentAuditReq req) throws Exception{ public Result audit(@RequestBody @Valid DepartmentAuditReq req) throws Exception{
if (!StringUtils.isEmpty(req)) { if (!StringUtils.isEmpty(req)) {
return departmentService.audit(req); return departmentService.audit(req);
} }
return Result.error("企业审核失败"); return Result.error("企业审核失败");
} }
@PostMapping(value = "/check")
@ApiOperation(value = "企业审核--校验企业是否已认证")
public Result check(@RequestBody @Valid CheckDepartmentAuditReq req) {
return departmentService.check(req);
}
/** /**
* 添加用户 * 添加用户
* @param saveCustomerRequest * @param saveCustomerRequest
...@@ -82,11 +96,22 @@ public class DepartmentController extends BaseController { ...@@ -82,11 +96,22 @@ public class DepartmentController extends BaseController {
* @throws Exception * @throws Exception
*/ */
@PostMapping(value = "/add") @PostMapping(value = "/add")
@ApiOperation(value = "添加用户") @ApiOperation(value = "添加企业")
public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception { public Result add(@RequestBody @Valid SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception {
if (saveCustomerRequest != null) { if (saveCustomerRequest != null) {
return departmentService.add(saveCustomerRequest, req); return departmentService.add(saveCustomerRequest, req);
} }
return Result.error("添加用户失败!"); return Result.error("添加用户失败!");
} }
/**
* 通过授权码查税号--调用接口
* @param goodsToken
* @return
*/
@PostMapping(value = "/findUcCodeByGoodsToken")
@ApiOperation(value = "通过授权码查税号--调用接口")
public Result findUcCodeByGoodsToken(@RequestParam(name = "goodsToken") String goodsToken) {
return departmentService.findUcCodeByGoodsToken(goodsToken);
}
} }
\ No newline at end of file
package com.jz.manage.moduls.controller.customer.bean.dto; package com.jz.manage.moduls.controller.customer.bean.dto;
import com.fasterxml.jackson.annotation.JsonIgnore;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
...@@ -39,5 +40,6 @@ public class EnterpriseAuditDto { ...@@ -39,5 +40,6 @@ public class EnterpriseAuditDto {
private Date auditTime; private Date auditTime;
@ApiModelProperty(value = "企业角色") @ApiModelProperty(value = "企业角色")
@JsonIgnore
private Long roleId; private Long roleId;
} }
package com.jz.manage.moduls.controller.customer.bean.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/18
* @Version:
*/
@ApiModel("校验企业是否通过认证请求参数")
@Data
public class CheckDepartmentAuditReq implements Serializable {
@ApiModelProperty(value = "统一社会信用代码")
@NotNull(message = "统一社会信用代码不能为空")
private String unifiedCreditCode;
}
...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel; ...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
/** /**
...@@ -17,9 +18,15 @@ import java.io.Serializable; ...@@ -17,9 +18,15 @@ import java.io.Serializable;
public class DepartmentAuditReq implements Serializable { public class DepartmentAuditReq implements Serializable {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
@NotNull(message = "企业id不能为空")
private Long departmentId; private Long departmentId;
@ApiModelProperty(value = "统一社会信用代码")
@NotNull(message = "统一社会信用代码不能为空")
private String unifiedCreditCode;
@ApiModelProperty(value = "审核状态 01通过,02未通过") @ApiModelProperty(value = "审核状态 01通过,02未通过")
@NotNull(message = "审核状态不能为空")
private String auditStatus; private String auditStatus;
@ApiModelProperty(value = "驳回原因") @ApiModelProperty(value = "驳回原因")
......
package com.jz.manage.moduls.controller.customer.bean.request; package com.jz.manage.moduls.controller.customer.bean.request;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.util.Date;
/** /**
* @ClassName: * @ClassName:
* @Author: Carl * @Author: Carl
...@@ -18,8 +15,7 @@ import java.util.Date; ...@@ -18,8 +15,7 @@ import java.util.Date;
@Data @Data
public class EnterpriseAuditRequest extends BasePageBean { public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "企业地址")
private String registeredAddress;
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
private String departmentName; private String departmentName;
...@@ -38,4 +34,7 @@ public class EnterpriseAuditRequest extends BasePageBean { ...@@ -38,4 +34,7 @@ public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "企业角色") @ApiModelProperty(value = "企业角色")
private Long roleId; private Long roleId;
@ApiModelProperty(value = "企业地址")
private String registeredAddress;
} }
...@@ -3,11 +3,12 @@ package com.jz.manage.moduls.controller.customer.bean.request; ...@@ -3,11 +3,12 @@ package com.jz.manage.moduls.controller.customer.bean.request;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.jz.common.bean.BasePageBean; import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
/** /**
...@@ -16,49 +17,56 @@ import java.math.BigDecimal; ...@@ -16,49 +17,56 @@ import java.math.BigDecimal;
* @Date: 2020/12/10 * @Date: 2020/12/10
* @Version: * @Version:
*/ */
@ApiModel(value = "用户添加信息请求参数封装") @ApiModel(value = "企业添加信息请求参数封装")
@Data @Data
public class SaveCustomerRequest extends BasePageBean { public class SaveCustomerRequest implements Serializable {
@ApiModelProperty(value = "企业id")
@TableId(value = "department_id",type = IdType.AUTO)
private Long departmentId;
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
@NotNull(message = "企业名称不能为空")
private String departmentName; private String departmentName;
@ApiModelProperty(value = "企业地址") @ApiModelProperty(value = "企业地址")
@NotNull(message = "企业地址不能为空")
private String registeredAddress; private String registeredAddress;
@ApiModelProperty(value = "营业执照") @ApiModelProperty(value = "营业执照")
@NotNull(message = "营业执照不能为空")
private String businessLicense; private String businessLicense;
@ApiModelProperty(value = "统一社会信用代码") @ApiModelProperty(value = "统一社会信用代码")
@NotNull(message = "统一社会信用代码不能为空")
private String unifiedCreditCode; private String unifiedCreditCode;
@ApiModelProperty(value = "银行卡号") @ApiModelProperty(value = "银行卡号")
@NotNull(message = "银行卡号不能为空")
private String bankCardNumber; private String bankCardNumber;
@ApiModelProperty(value = "开户行地址") @ApiModelProperty(value = "开户行地址")
@NotNull(message = "开户行地址不能为空")
private String bankAddress; private String bankAddress;
@ApiModelProperty(value = "联系人姓名") @ApiModelProperty(value = "联系人姓名")
@NotNull(message = "联系人姓名不能为空")
private String linkman; private String linkman;
@ApiModelProperty(value = "联系人电话") @ApiModelProperty(value = "联系人电话")
@NotNull(message = "联系人电话不能为空")
private String telephone; private String telephone;
@ApiModelProperty(value = "账号名") @ApiModelProperty(value = "账号名")
@NotNull(message = "账号名不能为空")
private String customerAccount; private String customerAccount;
@ApiModelProperty(value = "账号手机号") @ApiModelProperty(value = "账号手机号",hidden = true)
private String customerPhone; private String customerPhone;
@ApiModelProperty(value = "密码") @ApiModelProperty(value = "密码")
@NotNull(message = "密码不能为空")
private String password; private String password;
@ApiModelProperty(value = "充值金额") @ApiModelProperty(value = "充值金额")
private BigDecimal balanceMoney; private BigDecimal balanceMoney;
@ApiModelProperty(value = "用户角色") @ApiModelProperty(value = "用户角色",hidden = true)
private String roleId; private String roleId;
} }
...@@ -6,10 +6,8 @@ import com.jz.common.utils.Result; ...@@ -6,10 +6,8 @@ import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.finance.platForm.dto.BalanceInfoDto; import com.jz.manage.moduls.controller.finance.platForm.dto.BalanceInfoDto;
import com.jz.manage.moduls.controller.finance.platForm.dto.BalanceListDto; import com.jz.manage.moduls.controller.finance.platForm.dto.BalanceListDto;
import com.jz.manage.moduls.controller.finance.platForm.req.BalanceAuditRequest; import com.jz.manage.moduls.controller.finance.platForm.dto.DepartmentTradeDto;
import com.jz.manage.moduls.controller.finance.platForm.req.BalanceListRequest; import com.jz.manage.moduls.controller.finance.platForm.req.*;
import com.jz.manage.moduls.controller.finance.platForm.req.BalanceQuickReq;
import com.jz.manage.moduls.controller.finance.platForm.req.CashOutQuickReq;
import com.jz.manage.moduls.service.FinanceCustomerBalanceService; import com.jz.manage.moduls.service.FinanceCustomerBalanceService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -144,8 +142,30 @@ public class FinanceCustomerBalanceController extends BaseController { ...@@ -144,8 +142,30 @@ public class FinanceCustomerBalanceController extends BaseController {
* @return * @return
*/ */
@PostMapping("/searchCompany") @PostMapping("/searchCompany")
@ApiOperation(value = "充值/提现管理-搜索企业", notes = "搜索企业") @ApiOperation(value = "充值/提现管理--搜索企业", notes = "搜索企业")
public Result searchCompany(@RequestParam String search) { public Result searchCompany(@RequestParam String search) {
return financeCustomerBalanceService.searchCompany(search); return financeCustomerBalanceService.searchCompany(search);
} }
/**
* 条件查询企业交易记录
* @param req
* @return
*/
@PostMapping("/tradeCompany")
@ApiOperation(value = "财务管理-企业--条件查询企业交易记录")
public Result<IPage<DepartmentTradeDto>> tradeCompany(@RequestBody TradeCompanyReq req) {
return financeCustomerBalanceService.tradeCompany(req);
}
/**
* 主键查询企业交易详情
* @param departmentId
* @return
*/
@GetMapping("/tradeCompanyDetail")
@ApiOperation(value = "财务管理-企业--主键查询企业交易详情")
public Result tradeCompanyDetail(@RequestParam(name = "departmentId") Long departmentId) {
return financeCustomerBalanceService.tradeCompanyDetail(departmentId);
}
} }
\ No newline at end of file
package com.jz.manage.moduls.controller.finance.platForm.dto; package com.jz.manage.moduls.controller.finance.platForm.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date;
/** /**
* @ClassName: * @ClassName:
...@@ -38,10 +41,14 @@ public class DepartmentAssetsDto implements Serializable { ...@@ -38,10 +41,14 @@ public class DepartmentAssetsDto implements Serializable {
private String dataName; private String dataName;
@ApiModelProperty("生效日期") @ApiModelProperty("生效日期")
private String takeEffectTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date takeEffectTime;
@ApiModelProperty("失效日期") @ApiModelProperty("失效日期")
private String invalidTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date invalidTime;
@ApiModelProperty("购买方式") @ApiModelProperty("购买方式")
private String purchaseMethod; private String purchaseMethod;
...@@ -59,4 +66,7 @@ public class DepartmentAssetsDto implements Serializable { ...@@ -59,4 +66,7 @@ public class DepartmentAssetsDto implements Serializable {
private String secondType; private String secondType;
@ApiModelProperty("订单id") @ApiModelProperty("订单id")
private Long orderId; private Long orderId;
@ApiModelProperty(value = "价格类型 01免费,02收费")
private String priceType;
} }
package com.jz.manage.moduls.controller.finance.platForm.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/18
* @Version:
*/
@ApiModel("条件分页查询企业交易记录返回参数")
@Data
public class DepartmentTradeDto implements Serializable {
@ApiModelProperty(value = "企业名称")
private String departmentName;
@ApiModelProperty(value = "企业id")
private Long departmentId;
@ApiModelProperty(value = "企业联系人")
private String linkman;
@ApiModelProperty(value = "企业联系人电话")
private String telephone;
@ApiModelProperty(value = "交易订单量")
private String orderTotal;
@ApiModelProperty(value = "交易总金额")
private String transactionMoney;
}
package com.jz.manage.moduls.controller.finance.platForm.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/19
* @Version:
*/
@ApiModel("财务管理-企业-企业交易详情返回参数")
@Data
public class TradeCompanyDetailDto implements Serializable {
@ApiModelProperty(value = "订单id")
private Long orderId;
@ApiModelProperty(value = "订单编号")
private String orderNumber;
@ApiModelProperty(value = "商品名称")
private String dataName;
@ApiModelProperty(value = "订单金额")
private String paymentMoney;
@ApiModelProperty(value = "创建时间")
@DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date creTime;
@ApiModelProperty(value = "支付方式 01:余额")
private String paymentMethod;
}
package com.jz.manage.moduls.controller.finance.platForm.req;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/18
* @Version:
*/
@ApiModel("企业交易记录请求参数")
@Data
public class TradeCompanyReq extends BasePageBean implements Serializable {
@ApiModelProperty(value = "搜索条件")
private String search;
@ApiModelProperty(value = "联系人电话")
private String telephone;
}
...@@ -102,13 +102,18 @@ public class DataGoodsCategoryController extends BaseController { ...@@ -102,13 +102,18 @@ public class DataGoodsCategoryController extends BaseController {
*/ */
@PostMapping(value = "/selectByCategory") @PostMapping(value = "/selectByCategory")
@ApiOperation(value = "商品分类管理--条件查询商品分类") @ApiOperation(value = "商品分类管理--条件查询商品分类")
public Result selectByCategory(@RequestParam(required = false) String search) { public Result selectByCategory(@RequestParam(name = "search",required = false) String search) {
return categoryService.selectByCategory(search); return categoryService.selectByCategory(search);
} }
@PostMapping(value = "/deleteByCategory") @PostMapping(value = "/deleteByCategory")
@ApiOperation(value = "商品分类管理--删除分类") @ApiOperation(value = "商品分类管理--删除分类")
public Result deleteByCategory(@RequestBody @Valid CategoryAndSceneReq req) { public Result deleteByCategory(@RequestBody @Valid CategoryAndSceneReq req) {
return categoryService.deleteByCategory(req); try {
return categoryService.deleteByCategory(req);
}catch (Exception e) {
e.printStackTrace();
return Result.of_error(ResultMsg.DELETE_FAIL);
}
} }
} }
\ No newline at end of file
...@@ -8,13 +8,12 @@ import com.jz.common.constant.Constants; ...@@ -8,13 +8,12 @@ import com.jz.common.constant.Constants;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsAuditDto; import com.jz.manage.moduls.controller.goods.bean.dto.*;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.manage.moduls.controller.goods.bean.request.*; import com.jz.manage.moduls.controller.goods.bean.request.*;
import com.jz.manage.moduls.entity.DataGoods; import com.jz.manage.moduls.entity.DataGoods;
import com.jz.manage.moduls.service.DataGoodsService; import com.jz.manage.moduls.service.DataGoodsService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
...@@ -63,7 +62,12 @@ public class DataGoodsController extends BaseController { ...@@ -63,7 +62,12 @@ public class DataGoodsController extends BaseController {
@ApiOperation(value = "商品审核管理--列表查询数据") @ApiOperation(value = "商品审核管理--列表查询数据")
public Result<IPage<DataGoodsAuditDto>> findByAudit(@RequestBody DataGoodsAuditListReq req, HttpServletRequest httpRequest){ public Result<IPage<DataGoodsAuditDto>> findByAudit(@RequestBody DataGoodsAuditListReq req, HttpServletRequest httpRequest){
return dataGoodsService.findByAudit(req,httpRequest); return dataGoodsService.findByAudit(req,httpRequest);
}
@GetMapping(value = "/findByDataTypeList")
@ApiOperation(value = "商品列表--获取数据类型", notes = "调用接口")
public Result findByDataTypeList() {
return dataGoodsService.findByDataTypeList();
} }
/** /**
...@@ -79,23 +83,6 @@ public class DataGoodsController extends BaseController { ...@@ -79,23 +83,6 @@ public class DataGoodsController extends BaseController {
/**主键查询数据商品
* @param DataGoodsRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/view")
public BaseBeanResponse<DataGoodsDto> view(@RequestBody DataGoodsRequest DataGoodsRequest, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoodsDto> baseBeanResponse = new BaseBeanResponse<DataGoodsDto>();
try {
baseBeanResponse = dataGoodsService.findById(DataGoodsRequest, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("请求失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/**新增数据商品 /**新增数据商品
* @param * @param
...@@ -122,54 +109,16 @@ public class DataGoodsController extends BaseController { ...@@ -122,54 +109,16 @@ public class DataGoodsController extends BaseController {
// } // }
/**删除数据商品
* @param DataGoodsRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/delete")
public BaseResponse delete(@RequestBody DataGoodsRequest DataGoodsRequest, HttpServletRequest httpRequest){
BaseResponse baseResponse = new BaseResponse();
try {
baseResponse = dataGoodsService.deleteById(DataGoodsRequest, httpRequest);
} catch (Exception e) {
baseResponse.setMessage("删除失败");
baseResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return baseResponse;
}
/**修改数据商品
* @param
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/edit")
public BaseBeanResponse<DataGoods> edit(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>();
try {
baseBeanResponse = dataGoodsService.edit(dataGoods, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return baseBeanResponse;
}
/** /**
* 商品上下架 * 商品上下架
* @param goodsId
* @param statusId
* @return * @return
*/ */
@PostMapping("/editStatus/{goodsId}/{statusId}") @PostMapping("/editStatus")
@ApiOperation(value = "商品列表--商品上下架") @ApiOperation(value = "商品列表--商品上下架")
public Result editStatus(@PathVariable(value = "goodsId") Long goodsId, public Result editStatus(@RequestBody @Valid DataGoodsEditReq req) {
@PathVariable(value = "statusId") String statusId) {
try { try {
return dataGoodsService.editStatus(goodsId, statusId); return dataGoodsService.editStatus(req);
}catch (Exception e) { }catch (Exception e) {
e.printStackTrace(); e.printStackTrace();
return Result.of_error(ResultMsg.UPDATE_FAIL); return Result.of_error(ResultMsg.UPDATE_FAIL);
...@@ -192,7 +141,7 @@ public class DataGoodsController extends BaseController { ...@@ -192,7 +141,7 @@ public class DataGoodsController extends BaseController {
* @param dataGoodsId * @param dataGoodsId
* @return * @return
*/ */
@PostMapping("/findByAuthorization") @GetMapping("/findByAuthorization")
@ApiOperation(value = "商品列表--浏览授权--查询授权") @ApiOperation(value = "商品列表--浏览授权--查询授权")
public Result findByAuthorization(@RequestParam(name = "dataGoodsId") Long dataGoodsId) { public Result findByAuthorization(@RequestParam(name = "dataGoodsId") Long dataGoodsId) {
return dataGoodsService.findByAuthorization(dataGoodsId); return dataGoodsService.findByAuthorization(dataGoodsId);
...@@ -221,6 +170,7 @@ public class DataGoodsController extends BaseController { ...@@ -221,6 +170,7 @@ public class DataGoodsController extends BaseController {
} }
/** /**
* 根据主键查询商品详情-api * 根据主键查询商品详情-api
* @param id * @param id
...@@ -247,6 +197,24 @@ public class DataGoodsController extends BaseController { ...@@ -247,6 +197,24 @@ public class DataGoodsController extends BaseController {
return dataGoodsService.getAPIList(req); return dataGoodsService.getAPIList(req);
} }
/**
* 获取制作的商品
* @param req
* @return
*/
@PostMapping("/getDataGoodsNewsList")
@ApiOperation(value = "制作商品-获取制作的商品")
public Result<IPage<ApiDataGoodsListDto>> getDataGoodsNewsList(@RequestBody @Valid DataGoodsByMakeReq req) {
return dataGoodsService.getDataGoodsNewsList(req);
}
@PostMapping("/updateSendStatus")
@ApiOperation(value = "制作商品-退回数据")
public Result updateSendStatus(@RequestBody @Valid ApiInterfaceDetailReq req) {
return dataGoodsService.updateSendStatus(req);
}
/** /**
* 获取API详情 * 获取API详情
* @param req * @param req
...@@ -254,10 +222,9 @@ public class DataGoodsController extends BaseController { ...@@ -254,10 +222,9 @@ public class DataGoodsController extends BaseController {
*/ */
@ApiOperation(value = "制作商品-API详情查询",notes = "调用接口") @ApiOperation(value = "制作商品-API详情查询",notes = "调用接口")
@PostMapping(value = "/getApiInterfaceDetail") @PostMapping(value = "/getApiInterfaceDetail")
public Result getApiInterfaceDetail(@RequestBody @Valid ApiInterfaceDetailReq req) { public Result<DataDetailsDto> getApiInterfaceDetail(@RequestBody @Valid ApiInterfaceDetailReq req) {
return dataGoodsService.getApiInterfaceDetail(req); return dataGoodsService.getApiInterfaceDetail(req);
} }
/** /**
* 制作商品 * 制作商品
* @param req * @param req
...@@ -273,6 +240,4 @@ public class DataGoodsController extends BaseController { ...@@ -273,6 +240,4 @@ public class DataGoodsController extends BaseController {
return Result.of_error("制作失败!"); return Result.of_error("制作失败!");
} }
} }
} }
\ No newline at end of file
...@@ -52,6 +52,11 @@ public class DemandController extends BaseController { ...@@ -52,6 +52,11 @@ public class DemandController extends BaseController {
return tDemandService.findByDemand(demandId); return tDemandService.findByDemand(demandId);
} }
/**
* 审核需求
* @param req
* @return
*/
@PostMapping("/auditDemand") @PostMapping("/auditDemand")
@ApiOperation(value = "需求审核--审核需求") @ApiOperation(value = "需求审核--审核需求")
public Result auditDemand(@RequestBody @Valid DemandAuditReq req) { public Result auditDemand(@RequestBody @Valid DemandAuditReq req) {
......
package com.jz.manage.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/22
* @Version:
*/
@ApiModel("根据api制作的商品返回参数")
@Data
public class ApiDataGoodsListDto implements Serializable {
@ApiModelProperty(value = "商品id")
private Long dataGoodsId;
@ApiModelProperty(value = "商品名称")
private String dataName;
@ApiModelProperty(value = "商品上下架状态 04上架,03下架")
private String dataStatus;
@ApiModelProperty(value = "apiKey")
private String apiKey;
}
package com.jz.manage.moduls.controller.goods.bean.dto;
import com.jz.manage.moduls.entity.DataGoods;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
import java.util.List;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/20
* @Version:
*/
@ApiModel("数据列表返回参数")
@Data
public class ApiDataListDto implements Serializable {
@ApiModelProperty(value = "api名称")
private String apiName;
@ApiModelProperty(value = "apiId")
private Long id;
@ApiModelProperty(value = "数据类型")
private String apiType;
@ApiModelProperty(value = "apiKey")
private String apiKey;
@ApiModelProperty(value = "数据大小" , hidden = true)
private String dataBag;
@ApiModelProperty(value = "创建时间")
private Date createDate;
@ApiModelProperty(value = "更新时间")
private Date updateDate;
@ApiModelProperty(value = "商品")
private List<ApiDataGoodsListDto> children;
// @ApiModelProperty(value = "商品id")
// private Long dataGoodsId;
//
// @ApiModelProperty(value = "商品名称")
// private String dataName;
//
// @ApiModelProperty(value = "商品上下架 01上架 02下架")
// private String dataStatus;
}
package com.jz.manage.moduls.controller.goods.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/20
* @Version:
*/
@ApiModel("api详情返回参数")
@Data
public class DataDetailsDto implements Serializable {
@ApiModelProperty(value = "apiId")
private Long id;
@ApiModelProperty(value = "apiKey")
private String apiKey;
@ApiModelProperty(value = "api名称")
private String apiName;
@ApiModelProperty(value = "返回类型")
private String outputType;
@ApiModelProperty(value = "加密方式 0:无 1:MD5,2:RES")
private String signType;
@ApiModelProperty(value = "传输方式 0,http,1.https")
private String apiProtocl;
@ApiModelProperty(value = "超时时间")
private String timeout;
@ApiModelProperty(value = "请求方式")
private String reqType;
@ApiModelProperty(value = "最大行数")
private Integer maxRow;
@ApiModelProperty(value = "每页返回数")
private Integer pageRow;
@ApiModelProperty(value = "调用限制")
private Integer reqFrequency;
@ApiModelProperty(value = "api描述")
private String apiFunction;
@ApiModelProperty(value = "最大数据量")
private Integer maxData;
@ApiModelProperty(value = "请求参数")
private String requestParam;
@ApiModelProperty(value = "返回参数")
private String responseParam;
@ApiModelProperty(value = "api类型")
private String apiType;
}
...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel; ...@@ -4,6 +4,7 @@ import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -16,7 +17,7 @@ import java.util.Date; ...@@ -16,7 +17,7 @@ import java.util.Date;
*/ */
@ApiModel(value = "商品列表", description = "商品列表参数对象") @ApiModel(value = "商品列表", description = "商品列表参数对象")
@Data @Data
public class DataGoodsListDto { public class DataGoodsListDto implements Serializable {
/** /**
* 数据商品id * 数据商品id
...@@ -66,7 +67,9 @@ public class DataGoodsListDto { ...@@ -66,7 +67,9 @@ public class DataGoodsListDto {
@ApiModelProperty(value = "数据状态") @ApiModelProperty(value = "数据状态")
private String dataStatus; private String dataStatus;
@ApiModelProperty(value = "商品状态") @ApiModelProperty(value = "商品状态 01有效,02失效")
private String goodsState; private String goodsState;
@ApiModelProperty(value = "apiKey")
private String apiKey;
} }
package com.jz.manage.moduls.controller.goods.bean.dto; package com.jz.manage.moduls.controller.goods.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -36,12 +38,18 @@ public class DepartmentDataGoodsDto implements Serializable { ...@@ -36,12 +38,18 @@ public class DepartmentDataGoodsDto implements Serializable {
private String goodsStatus; private String goodsStatus;
@ApiModelProperty("授权时间") @ApiModelProperty("授权时间")
private Date date; @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date privilegedTime;
@ApiModelProperty("授权开始时间") @ApiModelProperty("授权开始时间")
private String takeEffectTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date takeEffectTime;
@ApiModelProperty("授权结束时间") @ApiModelProperty("授权结束时间")
private String invalidTime; @DateTimeFormat(pattern = "yyyy-MM-dd")
@JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
private Date invalidTime;
} }
...@@ -17,10 +17,10 @@ import java.io.Serializable; ...@@ -17,10 +17,10 @@ import java.io.Serializable;
* @Description: * @Description:
**/ **/
@Data @Data
@ApiModel("API详情信息") @ApiModel(value = "API详情信息")
public class ApiInterfaceDetailReq implements Serializable { public class ApiInterfaceDetailReq implements Serializable {
@ApiModelProperty(value = "id",required = true) @ApiModelProperty(value = "apiKey",required = true)
@NotNull(message = "id不能为空") @NotNull(message = "apiKey不能为空")
private Long id; private String apiKey;
} }
...@@ -38,24 +38,12 @@ public class DataApiUpReq implements Serializable { ...@@ -38,24 +38,12 @@ public class DataApiUpReq implements Serializable {
private Long categoryId; private Long categoryId;
@ApiModelProperty(value = "场景分类") @ApiModelProperty(value = "场景分类")
private Long sceneId; private Long sceneId;
@ApiModelProperty(value = "目标地址")
@NotNull(message = "目标地址不能为空")
private String targetUrl;
@ApiModelProperty(value = "数据描述") @ApiModelProperty(value = "数据描述")
@NotNull(message = "数据描述不能为空") @NotNull(message = "数据描述不能为空")
private String dataDesc; private String dataDesc;
@ApiModelProperty(value = "商品图片") @ApiModelProperty(value = "商品图片")
@NotNull(message = "商品图片不能为空") @NotNull(message = "商品图片不能为空")
private String dataPicture; private String dataPicture;
@ApiModelProperty(value = "数据最大量")
@NotNull(message = "数据最大量不能为空")
private String dataMaximum;
@ApiModelProperty(value = "最大页数")
@NotNull(message = "最大页数不能为空")
private String maxPages;
@ApiModelProperty(value = "每页数据量")
@NotNull(message = "每页数据量不能为空")
private String dataSize;
@ApiModelProperty(value = "商品有限期") @ApiModelProperty(value = "商品有限期")
@NotNull(message = "商品有限期不能为空") @NotNull(message = "商品有限期不能为空")
private Integer goodsLimited; private Integer goodsLimited;
...@@ -71,23 +59,5 @@ public class DataApiUpReq implements Serializable { ...@@ -71,23 +59,5 @@ public class DataApiUpReq implements Serializable {
@ApiModelProperty(value = "次(元)") @ApiModelProperty(value = "次(元)")
private BigDecimal secondType; private BigDecimal secondType;
/**
* gateway制作参数
* api
*/
// @ApiModelProperty(value = "api类型 01:api 02: 数据包")
// private String apiType;
// @ApiModelProperty(value = "api名称")
// private String apiName;
// @ApiModelProperty(value = "返回类型 json/flow")
// private String returnType;
// @ApiModelProperty(value = "加密方式 MD5/RSA")
// private String encryMode;
// @ApiModelProperty(value = "传输方式")
// private String transMode;
// @ApiModelProperty(value = "超时时间")
// private String overTime;
// @ApiModelProperty(value = "api请求协议:http,https")
// private String apiProtocl;
} }
package com.jz.manage.moduls.controller.goods.bean.request;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/22
* @Version:
*/
@ApiModel(value = "制作商品-获取制作的商品请求参数")
@Data
public class DataGoodsByMakeReq extends BasePageBean implements Serializable {
@ApiModelProperty(value = "apiKey", required = true)
@NotNull(message = "apiKey不能为空")
private String apiKey;
@ApiModelProperty(value = "商品名称")
private String dataName;
@ApiModelProperty(value = "商品上架状态 03下架,04上架")
private Integer dataStatus;
}
package com.jz.manage.moduls.controller.goods.bean.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/20
* @Version:
*/
@ApiModel
@Data
public class DataGoodsEditReq implements Serializable {
@ApiModelProperty(value = "商品id", required = true)
@NotNull(message = "商品id不能为空")
private Long dataGoodsId;
@ApiModelProperty(value = "上下架状态 ,01上架,02下架",required = true)
@NotNull(message = "上下架状态不能为空")
private String statusId;
}
package com.jz.manage.moduls.controller.goods.bean.request; package com.jz.manage.moduls.controller.goods.bean.request;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import javax.validation.constraints.NotNull;
import java.io.Serializable; import java.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -17,30 +20,40 @@ import java.util.Date; ...@@ -17,30 +20,40 @@ import java.util.Date;
@Data @Data
@ApiModel @ApiModel
public class GoodsByAuthorizationReq implements Serializable { public class GoodsByAuthorizationReq implements Serializable {
@ApiModelProperty(value = "商品id") @ApiModelProperty(value = "商品id", required = true)
@NotNull(message = "商品id不能为空")
private Long dataGoodsId; private Long dataGoodsId;
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id", required = true)
@NotNull(message = "企业id不能为空")
private Long departmentId; private Long departmentId;
@ApiModelProperty(value = "用户id") @ApiModelProperty(value = "用户id", required = true)
@NotNull(message = "用户id不能为空")
private Long customerId; private Long customerId;
@ApiModelProperty(value = "购买方式 01年,02季,03月,04次") @ApiModelProperty(value = "购买方式 01年,02季,03月,04次", required = true)
@NotNull(message = "购买方式不能为空")
private String purchaseMethod; private String purchaseMethod;
@ApiModelProperty(value = "生效期") @ApiModelProperty(value = "生效期", required = true)
@NotNull(message = "生效期不能为空")
private Date takeEffectTime; private Date takeEffectTime;
@ApiModelProperty(value = "失效期") @ApiModelProperty(value = "失效期", required = true)
@NotNull(message = "失效期不能为空")
private Date invalidTime; private Date invalidTime;
@ApiModelProperty(value = "apiKey") @ApiModelProperty(value = "apiKey", required = true)
@NotNull(message = "apiKey不能为空")
private String apiKey; private String apiKey;
@ApiModelProperty(value = "商品金额") @ApiModelProperty(value = "商品金额", required = true)
@NotNull(message = "商品金额不能为空")
private BigDecimal dataPrice; private BigDecimal dataPrice;
@ApiModelProperty(value = "价格类型") @ApiModelProperty(value = "价格类型 01免费,02收费")
private String priceType; private String priceType;
@ApiModelProperty(value = "资产账户id") @ApiModelProperty(value = "资产账户id", required = true)
@NotNull(message = "资产账户id不能为空")
private Long assetsId; private Long assetsId;
} }
...@@ -5,7 +5,9 @@ import com.jz.common.utils.Result; ...@@ -5,7 +5,9 @@ import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.order.bean.dto.OrderDetailDto; import com.jz.manage.moduls.controller.order.bean.dto.OrderDetailDto;
import com.jz.manage.moduls.controller.order.bean.dto.OrderDto; import com.jz.manage.moduls.controller.order.bean.dto.OrderDto;
import com.jz.manage.moduls.controller.order.bean.req.ApiInterfaceDetailReq;
import com.jz.manage.moduls.controller.order.bean.req.OrderRequest; import com.jz.manage.moduls.controller.order.bean.req.OrderRequest;
import com.jz.manage.moduls.controller.order.bean.req.SaltResetReq;
import com.jz.manage.moduls.service.OrderService; import com.jz.manage.moduls.service.OrderService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -14,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -14,6 +16,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.validation.Valid;
/** /**
* 订单表(TOrder)表控制层 * 订单表(TOrder)表控制层
...@@ -48,17 +51,38 @@ public class OrderController extends BaseController { ...@@ -48,17 +51,38 @@ public class OrderController extends BaseController {
* @param orderId * @param orderId
* @author Bellamy * @author Bellamy
*/ */
@GetMapping(value = "/orderDetail") @GetMapping(value = "/getOrderDetail")
@ApiOperation(value = "订单详情", notes = "订单详情") @ApiOperation(value = "API订单--订单详情", notes = "订单详情")
public Result<OrderDetailDto> getOrderDetail(@RequestParam(value = "orderId") String orderId, HttpServletRequest req) throws Exception { public Result<OrderDetailDto> getOrderDetail(@RequestParam(value = "orderId") String orderId, HttpServletRequest req) throws Exception {
Result<OrderDetailDto> result = new Result<OrderDetailDto>(); Result<OrderDetailDto> result = new Result<OrderDetailDto>();
if (StringUtils.isNotEmpty(orderId)) { if (StringUtils.isNotEmpty(orderId)) {
OrderDetailDto orderDto = orderService.queryOrderDetail(orderId); return orderService.queryOrderDetail(orderId);
result.setData(orderDto);
} else { } else {
result.setMessage("参数为不能为空!"); result.setMessage("参数为不能为空!");
} }
return result; return result;
} }
@PostMapping(value = "/getOrderApiDetail")
@ApiOperation(value = "API订单--订单详情--接口文档")
public Result getOrderApiDetail(@RequestBody @Valid ApiInterfaceDetailReq req) {
return orderService.getOrderApiDetail(req);
}
/**
* 订单详情--重置盐值
* @param req
* @return
*/
@PostMapping(value = "/resetSalt")
@ApiOperation(value = "订单详情---重置盐值", notes = "重置盐值")
public Result resetSalt(@RequestBody @Valid SaltResetReq req) {
Result result = new Result();
if (StringUtils.isNotEmpty(req.getGoodsToken()) && req.getId() != null) {
result = orderService.updateSalt(req);
}else {
result.setMessage("参数不能为空!");
}
return result;
}
} }
\ No newline at end of file
package com.jz.manage.moduls.controller.order.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.List;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/2/18
* @Version:
*/
@ApiModel("订单详情")
@Data
public class ApiInterfaceDetailDto implements Serializable {
/**
* 目标url
*/
@ApiModelProperty("目标url")
private String targetUrl;
/**
* 请求方式:GET POST
*/
@ApiModelProperty("请求方式")
private String reqType;
/**
* api唯一标识
*/
@ApiModelProperty("api唯一标识")
private String apiKey;
/**
* '输出类型:flow 流形式输出, json格式输出',
*/
@ApiModelProperty("输出类型")
private String outputType;
@ApiModelProperty("参数名称")
private String paramsName;
@ApiModelProperty("参数类型")
private String paramsType;
@ApiModelProperty("参数描述")
private String paramsDesc;
@ApiModelProperty("默认值")
private String defaultValue;
}
...@@ -19,6 +19,6 @@ public class OrderAndAuthorizedDto implements Serializable { ...@@ -19,6 +19,6 @@ public class OrderAndAuthorizedDto implements Serializable {
@ApiModelProperty("是否有效:01有效,02无效") @ApiModelProperty("是否有效:01有效,02无效")
private String goodsState; private String goodsState;
@ApiModelProperty("用户id") @ApiModelProperty("企业id")
private Long customerId; private Long departmentId;
} }
...@@ -3,6 +3,7 @@ package com.jz.manage.moduls.controller.order.bean.dto; ...@@ -3,6 +3,7 @@ package com.jz.manage.moduls.controller.order.bean.dto;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -15,6 +16,7 @@ import java.util.Date; ...@@ -15,6 +16,7 @@ import java.util.Date;
*/ */
@ApiModel(value = "订单管理--订单列表返回参数对象", description = "订单列表返回参数对象") @ApiModel(value = "订单管理--订单列表返回参数对象", description = "订单列表返回参数对象")
@Data
public class OrderDetailDto { public class OrderDetailDto {
private static final long serialVersionUID = 651546246975691600L; private static final long serialVersionUID = 651546246975691600L;
/** /**
...@@ -23,118 +25,34 @@ public class OrderDetailDto { ...@@ -23,118 +25,34 @@ public class OrderDetailDto {
@ApiModelProperty(value = "订单编号") @ApiModelProperty(value = "订单编号")
private String orderNumber; private String orderNumber;
/** /**
* 订单状态:01待支付,02已支付,03已取消 * 数据名称
*/
@ApiModelProperty(value = "订单状态:01待支付,02已支付,03已取消")
private String orderStatus;
/**
* 订单金额
*/ */
@ApiModelProperty(value = "订单金额") @ApiModelProperty(value = "数据名称")
private BigDecimal orderMoney; private String dataName;
@ApiModelProperty(value = "数据类型")
private String dataType;
/** /**
* 订单时间 * 订单时间
*/ */
@ApiModelProperty(value = "订单时间") @ApiModelProperty(value = "订单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime; private Date orderTime;
/**
* 支付方式:01余额
*/
@ApiModelProperty(value = "支付方式:01余额")
private String paymentMethod;
/** /**
* 购买方式:01年,02季,03月,04次(服务类型) * 购买方式:01年,02季,03月,04次(服务类型)
*/ */
@ApiModelProperty(value = "购买方式:01年,02季,03月,04次(服务类型)") @ApiModelProperty(value = "购买方式:01年,02季,03月,04次(服务类型)")
private String purchaseMethod; private String purchaseMethod;
@ApiModelProperty(value = "有效期")
private String indate;
/** /**
* 数据名称 * 失效日期
*/
@ApiModelProperty(value = "数据名称")
private String dataName;
/**
* 数据分类
*/
@ApiModelProperty(value = "数据分类")
private String dataType;
/**
* 企业名称
*/ */
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "失效日期")
private String departmentName; private Date invalidTime;
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getOrderStatus() {
return orderStatus;
}
public void setOrderStatus(String orderStatus) {
this.orderStatus = orderStatus;
}
public BigDecimal getOrderMoney() {
return orderMoney;
}
public void setOrderMoney(BigDecimal orderMoney) {
this.orderMoney = orderMoney;
}
public Date getOrderTime() {
return orderTime;
}
public void setOrderTime(Date orderTime) {
this.orderTime = orderTime;
}
public String getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public String getPurchaseMethod() {
return purchaseMethod;
}
public void setPurchaseMethod(String purchaseMethod) {
this.purchaseMethod = purchaseMethod;
}
public String getDataName() {
return dataName;
}
public void setDataName(String dataName) {
this.dataName = dataName;
}
public String getDataType() {
return dataType;
}
public void setDataType(String dataType) {
this.dataType = dataType;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) { @ApiModelProperty("goodsToken")
this.departmentName = departmentName; private String goodsToken;
}
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat; ...@@ -4,6 +4,7 @@ import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty; import io.swagger.annotations.ApiModelProperty;
import lombok.Data; import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -47,8 +48,9 @@ public class OrderDto { ...@@ -47,8 +48,9 @@ public class OrderDto {
* 订单时间 * 订单时间
*/ */
@ApiModelProperty(value = "订单时间") @ApiModelProperty(value = "订单时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss")
private Date orderTime; @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private Date creTime;
/** /**
* 企业名称 * 企业名称
...@@ -56,4 +58,7 @@ public class OrderDto { ...@@ -56,4 +58,7 @@ public class OrderDto {
@ApiModelProperty(value = "企业名称") @ApiModelProperty(value = "企业名称")
private String departmentName; private String departmentName;
}
\ No newline at end of file @ApiModelProperty(value = "apiKey")
private String apiKey;
}
\ No newline at end of file
package com.jz.manage.moduls.controller.order.bean.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author Carl
* @DATE: 2021/2/18 15:34
**/
@Data
@ApiModel("API详情信息")
public class ApiInterfaceDetailReq implements Serializable {
@ApiModelProperty(value = "id",required = false)
private Long id;
@ApiModelProperty(value = "apiKey",required = true)
@NotNull(message = "apiKey不能为空")
private String apiKey;
}
package com.jz.manage.moduls.controller.order.bean.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.models.req
* @PROJECT_NAME: jz-dm-parent
* @NAME: SaltResetReq
* @DATE: 2020-12-26/19:16
* @DAY_NAME_SHORT: 周六
* @Description:
**/
@Data
@ApiModel("盐值重置请求体")
public class SaltResetReq implements Serializable {
@ApiModelProperty(value = "授权码",required = true)
@NotNull(message = "授权码不能为空")
private String goodsToken;
@ApiModelProperty(value = "订单id")
// @NotNull(message = "订单id不能为空")
private Long id;
}
...@@ -27,12 +27,15 @@ public class DataGoods implements Serializable { ...@@ -27,12 +27,15 @@ public class DataGoods implements Serializable {
* 数据商品id * 数据商品id
*/ */
@TableId(value = "data_goods_id", type = IdType.AUTO) @TableId(value = "data_goods_id", type = IdType.AUTO)
@ApiModelProperty(value = "数据商品id")
private Long dataGoodsId; private Long dataGoodsId;
/** /**
* 商品分类id(行业) * 商品分类id(行业)
*/ */
@TableField("category_id") @TableField("category_id")
@ApiModelProperty(value = "商品分类id")
private Long categoryId; private Long categoryId;
@ApiModelProperty(value = "场景id")
@TableField("scene_id") @TableField("scene_id")
private Long sceneId; private Long sceneId;
/** /**
...@@ -47,6 +50,7 @@ public class DataGoods implements Serializable { ...@@ -47,6 +50,7 @@ public class DataGoods implements Serializable {
* 数据商品名称 * 数据商品名称
*/ */
@TableField("data_name") @TableField("data_name")
@ApiModelProperty(value = "数据商品名称")
private String dataName; private String dataName;
/** /**
* 数据类型:01api,02数据包 * 数据类型:01api,02数据包
...@@ -78,6 +82,9 @@ public class DataGoods implements Serializable { ...@@ -78,6 +82,9 @@ public class DataGoods implements Serializable {
*/ */
@TableField("price_type") @TableField("price_type")
private String priceType; private String priceType;
@TableField("api_key")
private String apiKey;
/** /**
* 商品规格 * 商品规格
*/ */
...@@ -87,6 +94,7 @@ public class DataGoods implements Serializable { ...@@ -87,6 +94,7 @@ public class DataGoods implements Serializable {
* 数据状态:01预售,02在售中,03下架,04上架 * 数据状态:01预售,02在售中,03下架,04上架
*/ */
@TableField("data_status") @TableField("data_status")
@ApiModelProperty(value = "数据状态: 03下架,04上架")
private String dataStatus; private String dataStatus;
/** /**
* 审核状态:01待审核,02已审核,03未通过 * 审核状态:01待审核,02已审核,03未通过
......
...@@ -84,7 +84,12 @@ public class DataGoodsCategory implements Serializable { ...@@ -84,7 +84,12 @@ public class DataGoodsCategory implements Serializable {
@TableField("del_flag") @TableField("del_flag")
@ApiModelProperty(value = "是否删除") @ApiModelProperty(value = "是否删除")
private String delFlag; private String delFlag;
@ApiModelProperty("场景")
@TableField(exist = false)
private String sceneName;
@ApiModelProperty("场景id")
@TableField(exist = false)
private String sceneId;
@TableField(exist = false) @TableField(exist = false)
private List<DataGoodsCategory> children; private List<DataGoodsCategory> children;
......
package com.jz.manage.moduls.entity; package com.jz.manage.moduls.entity;
import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel; import io.swagger.annotations.ApiModel;
...@@ -23,69 +24,95 @@ public class MallCustomer implements Serializable { ...@@ -23,69 +24,95 @@ public class MallCustomer implements Serializable {
/** /**
* 用户id * 用户id
*/ */
@TableId(value = "customer_id", type = IdType.AUTO) @TableId(value = "customer_id",type = IdType.AUTO)
private Long customerId; private Long customerId;
/** /**
* 企业id * 企业id
*/ */
@TableField(value = "department_id")
private Long departmentId; private Long departmentId;
/** /**
* 密码 * 密码
*/ */
@TableField(value = "password")
private String password; private String password;
/** /**
* 账户 * 账户
*/ */
@TableField(value = "customer_account")
private String customerAccount; private String customerAccount;
/** /**
* 用户真实姓名 * 用户真实姓名
*/ */
@TableField(value = "customer_name")
private String customerName; private String customerName;
/** /**
* 联系电话 * 联系电话
*/ */
@TableField(value = "customer_phone")
private String customerPhone; private String customerPhone;
/** /**
* 邮箱 * 邮箱
*/ */
@TableField(value = "customer_email")
private String customerEmail; private String customerEmail;
/** /**
* 地址 * 地址
*/ */
@TableField(value = "customer_address")
private String customerAddress; private String customerAddress;
/**
* 供应商编码
*/
@TableField(value = "vendor_id")
private String vendorId;
/**
* 账号来源
*/
@TableField(value = "customer_source")
private String customerSource;
/** /**
* 用户积分 * 用户积分
*/ */
@TableField(value = "customer_point")
private Long customerPoint; private Long customerPoint;
/** /**
* 注册时间 * 注册时间
*/ */
@TableField(value = "register_time")
private Date registerTime; private Date registerTime;
/** /**
* 会员等级 * 会员等级
*/ */
@TableField(value = "customer_level")
private String customerLevel; private String customerLevel;
/** /**
* 证件号 * 证件号
*/ */
@TableField(value = "identity_card")
private String identityCard; private String identityCard;
/** /**
* 创建时间 * 创建时间
*/ */
@TableField(value = "cre_time")
private Date creTime; private Date creTime;
/** @TableField(value = "upt_person")
* 创建人
*/
private String crePerson; private String crePerson;
/** /**
* 更新时间 * 更新时间
*/ */
@TableField(value = "upt_time")
private Date uptTime; private Date uptTime;
/**
* 更新人
*/
@TableField(value = "upt_person")
private String uptPerson;
/** /**
* 删除标识:Y是,N否 * 删除标识:Y是,N否
*/ */
@TableField(value = "del_flag")
private String delFlag; private String delFlag;
} }
\ No newline at end of file
...@@ -34,6 +34,8 @@ public class Order implements Serializable { ...@@ -34,6 +34,8 @@ public class Order implements Serializable {
* 用户id * 用户id
*/ */
private Long customerId; private Long customerId;
private Long departmentId;
/** /**
* 订单状态:01待支付,02已支付,03已取消 * 订单状态:01待支付,02已支付,03已取消
*/ */
......
...@@ -30,7 +30,7 @@ import java.util.Date; ...@@ -30,7 +30,7 @@ import java.util.Date;
public class SceneCategory implements Serializable { public class SceneCategory implements Serializable {
private static final long serialVersionUID = -6098559795341556267L; private static final long serialVersionUID = -6098559795341556267L;
/** /**
* 商品分类id * 场景分类id
*/ */
@TableId(value = "scene_id", type = IdType.AUTO) @TableId(value = "scene_id", type = IdType.AUTO)
@ApiModelProperty(value = "场景分类id") @ApiModelProperty(value = "场景分类id")
......
...@@ -26,11 +26,16 @@ public interface DataGoodsCategoryDao extends BaseMapper<DataGoodsCategory> { ...@@ -26,11 +26,16 @@ public interface DataGoodsCategoryDao extends BaseMapper<DataGoodsCategory> {
/** /**
* 条件查询分类 * 条件查询分类
* @param categoryName * @param id
* @return * @return
*/ */
List<DataGoodsCategory> selectByList(@Param("categoryName") String categoryName); List<DataGoodsCategory> selectByList(@Param("id") Long id);
CategoryAndSceneDto getCategoryDetail(@Param("categoryId") Long categoryId); CategoryAndSceneDto getCategoryDetail(@Param("categoryId") Long categoryId);
List<DataGoodsCategory> selectByCategory();
List<DataGoodsCategory> selectByList1(@Param("id") Long id);
} }
\ No newline at end of file
...@@ -6,9 +6,7 @@ import java.util.List; ...@@ -6,9 +6,7 @@ import java.util.List;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsAuditDto; import com.jz.manage.moduls.controller.goods.bean.dto.*;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsDto;
import com.jz.manage.moduls.controller.goods.bean.dto.DataGoodsListDto;
import com.jz.manage.moduls.entity.DataGoods; import com.jz.manage.moduls.entity.DataGoods;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -83,4 +81,25 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> { ...@@ -83,4 +81,25 @@ public interface DataGoodsDao extends BaseMapper<DataGoods> {
*/ */
IPage<DataGoodsListDto> findList(IPage<DataGoodsListDto> pageInfoResponse,@Param("ew")QueryWrapper<DataGoodsListDto> queryWrapper); IPage<DataGoodsListDto> findList(IPage<DataGoodsListDto> pageInfoResponse,@Param("ew")QueryWrapper<DataGoodsListDto> queryWrapper);
/**
* 批量删除商品分类id
* @param list
* @return
*/
int updateByCategory(@Param("list") List<DataGoods> list);
/**
* 查询api制作的商品
* @param list
* @return
*/
List<ApiDataGoodsListDto> selectByApiDataGoodsList(List<ApiDataListDto> list);
/**
* 搜索商品
* @param dataGoodsId
* @return
*/
DataGoods selectByGoodsId(@Param("dataGoodsId") Long dataGoodsId);
} }
\ No newline at end of file
...@@ -4,7 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper; ...@@ -4,7 +4,11 @@ import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.finance.platForm.dto.DepartmentAssetsDto; import com.jz.manage.moduls.controller.finance.platForm.dto.DepartmentAssetsDto;
import com.jz.manage.moduls.controller.finance.platForm.dto.DepartmentTradeDto;
import com.jz.manage.moduls.controller.finance.platForm.dto.TradeCompanyDetailDto;
import com.jz.manage.moduls.controller.finance.platForm.req.TradeCompanyReq;
import com.jz.manage.moduls.entity.Department; import com.jz.manage.moduls.entity.Department;
import com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto; import com.jz.manage.moduls.controller.customer.bean.dto.CompanyDetailsDto;
import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto; import com.jz.manage.moduls.controller.customer.bean.dto.EnterpriseAuditDto;
...@@ -40,4 +44,21 @@ public interface DepartmentDao extends BaseMapper<Department> { ...@@ -40,4 +44,21 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @return * @return
*/ */
List<DepartmentAssetsDto> selectByDepartment(@Param("ew")QueryWrapper<DepartmentAssetsDto> query); List<DepartmentAssetsDto> selectByDepartment(@Param("ew")QueryWrapper<DepartmentAssetsDto> query);
/**
* 企业交易记录-条件查询
* @param page
* @param
* @return