Commit 30c66f80 authored by zhangc's avatar zhangc

Merge branch 'dm_dev' of http://gitlab.ioubuy.cn/yaobenzhang/dm_project into dm_dev

 Conflicts:
	jz-dm-apigateway/src/main/java/com/jz/dm/service/impl/ProducerServiceImpl.java
parents 93162abe c6700669
...@@ -24,4 +24,7 @@ public class LogInfoListReq extends BasePageBean implements Serializable { ...@@ -24,4 +24,7 @@ public class LogInfoListReq extends BasePageBean implements Serializable {
private String status; private String status;
@ApiModelProperty(value = "ApiKey") @ApiModelProperty(value = "ApiKey")
private String apiKey; private String apiKey;
@ApiModelProperty(value = "客户请求token")
private String requestToken;
} }
package com.jz.common.bean; package com.jz.common.bean;
import com.jz.common.enums.UserTypeEnum;
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.io.Serializable; import java.io.Serializable;
...@@ -13,30 +13,41 @@ import java.io.Serializable; ...@@ -13,30 +13,41 @@ import java.io.Serializable;
* @Version: * @Version:
*/ */
@ApiModel @ApiModel
@Data
public class MallCustomerApiDto implements Serializable { public class MallCustomerApiDto implements Serializable {
private static final long serialVersionUID = 8769496459018372044L; private static final long serialVersionUID = 8769496459018372044L;
@ApiModelProperty(value = "用户id") /**
* 用户id
*/
@ApiModelProperty(value = "账户id")
private Long customerId; private Long customerId;
/**
@ApiModelProperty(value = "用户类型") * 企业id
private UserTypeEnum userTypeEnum; */
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
private Long departmentId; private Long departmentId;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/** /**
* 账户 * 账户
*/ */
@ApiModelProperty(value = "账户") @ApiModelProperty(value = "账户")
private String customerAccount; private String customerAccount;
/** /**
* 用户真实姓名 * 用户真实姓名
*/ */
@ApiModelProperty(value = "用户真实姓名") @ApiModelProperty(value = "真实姓名")
private String customerName; private String customerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "电话")
private String customerPhone;
/** /**
* 资产账户id * 资产账户id
...@@ -44,55 +55,9 @@ public class MallCustomerApiDto implements Serializable { ...@@ -44,55 +55,9 @@ public class MallCustomerApiDto implements Serializable {
@ApiModelProperty(value = "资产账户id") @ApiModelProperty(value = "资产账户id")
private String assetsId; private String assetsId;
public static long getSerialVersionUID() { @ApiModelProperty(value = "头像")
return serialVersionUID; private String headPortraitUrl;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
public UserTypeEnum getUserTypeEnum() {
return userTypeEnum;
}
public void setUserTypeEnum(UserTypeEnum userTypeEnum) {
this.userTypeEnum = userTypeEnum;
}
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
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 getAssetsId() {
return assetsId;
}
public void setAssetsId(String assetsId) { @ApiModelProperty(value = "角色")
this.assetsId = assetsId; private String roleId;
}
} }
...@@ -5,4 +5,6 @@ public interface RedisMessageConstant { ...@@ -5,4 +5,6 @@ public interface RedisMessageConstant {
static final String SENDTYPE_LOGIN = "002"; // 用于缓存注册用户时发送的验证码 static final String SENDTYPE_LOGIN = "002"; // 用于缓存注册用户时发送的验证码
static final String SENDTYPE_LOGIN_CUSTOMER = "003"; static final String SENDTYPE_LOGIN_CUSTOMER = "003";
static final String SENDTYPE_LOGIN_SYS = "004"; static final String SENDTYPE_LOGIN_SYS = "004";
static final String SENDTYPE_LOGIN_CUSTOMER_NOROLE = "005";
} }
\ No newline at end of file
...@@ -9,6 +9,8 @@ public enum ResultMsg { ...@@ -9,6 +9,8 @@ public enum ResultMsg {
* 执行成功 * 执行成功
*/ */
SUCCESS("执行成功"), SUCCESS("执行成功"),
LOGIN_SUCCESS("登陆成功"),
LOGIN_ERROR("登陆失败"),
PAY_FAILURE("支付失败"), PAY_FAILURE("支付失败"),
PAY_SUCCESS("支付成功"), PAY_SUCCESS("支付成功"),
IN_PROCESS("正在处理中"), IN_PROCESS("正在处理中"),
......
...@@ -37,7 +37,7 @@ public class DataGoods implements Serializable { ...@@ -37,7 +37,7 @@ public class DataGoods implements Serializable {
private Long userId; private Long userId;
@ApiModelProperty(value = "唯一数据商品标识") @ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId; private String apiOpenid;
/** /**
* 数据商品名称 * 数据商品名称
*/ */
......
...@@ -2,6 +2,7 @@ package com.jz.common.entity; ...@@ -2,6 +2,7 @@ package com.jz.common.entity;
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;
...@@ -14,6 +15,7 @@ import java.util.Date; ...@@ -14,6 +15,7 @@ import java.util.Date;
*/ */
@TableName("t_department") @TableName("t_department")
@ApiModel @ApiModel
@Data
public class Department implements Serializable { public class Department implements Serializable {
private static final long serialVersionUID = -86955761674824098L; private static final long serialVersionUID = -86955761674824098L;
/** /**
...@@ -36,6 +38,8 @@ public class Department implements Serializable { ...@@ -36,6 +38,8 @@ public class Department implements Serializable {
* 城市 * 城市
*/ */
private String city; private String city;
private String linkman;
/** /**
* 行业 * 行业
*/ */
...@@ -134,236 +138,4 @@ public class Department implements Serializable { ...@@ -134,236 +138,4 @@ public class Department implements Serializable {
private String delFlag; private String delFlag;
public Long getDepartmentId() {
return departmentId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getLegalRepresentative() {
return legalRepresentative;
}
public void setLegalRepresentative(String legalRepresentative) {
this.legalRepresentative = legalRepresentative;
}
public String getProvince() {
return province;
}
public void setProvince(String province) {
this.province = province;
}
public String getCity() {
return city;
}
public void setCity(String city) {
this.city = city;
}
public String getIndustry() {
return industry;
}
public void setIndustry(String industry) {
this.industry = industry;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
public String getRegisteredAddress() {
return registeredAddress;
}
public void setRegisteredAddress(String registeredAddress) {
this.registeredAddress = registeredAddress;
}
public Object getZoneCode() {
return zoneCode;
}
public void setZoneCode(Object zoneCode) {
this.zoneCode = zoneCode;
}
public String getDepartPicture() {
return departPicture;
}
public void setDepartPicture(String departPicture) {
this.departPicture = departPicture;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getTaxRegistration() {
return taxRegistration;
}
public void setTaxRegistration(String taxRegistration) {
this.taxRegistration = taxRegistration;
}
public Date getDepartPictureTime() {
return departPictureTime;
}
public void setDepartPictureTime(Date departPictureTime) {
this.departPictureTime = departPictureTime;
}
public Date getBusinessLicenseTime() {
return businessLicenseTime;
}
public void setBusinessLicenseTime(Date businessLicenseTime) {
this.businessLicenseTime = businessLicenseTime;
}
public Date getTaxRegistrationTime() {
return taxRegistrationTime;
}
public void setTaxRegistrationTime(Date taxRegistrationTime) {
this.taxRegistrationTime = taxRegistrationTime;
}
public String getUnifiedCreditCode() {
return unifiedCreditCode;
}
public void setUnifiedCreditCode(String unifiedCreditCode) {
this.unifiedCreditCode = unifiedCreditCode;
}
public String getBankName() {
return bankName;
}
public void setBankName(String bankName) {
this.bankName = bankName;
}
public String getBankCardNumber() {
return bankCardNumber;
}
public void setBankCardNumber(String bankCardNumber) {
this.bankCardNumber = bankCardNumber;
}
public String getBankAddress() {
return bankAddress;
}
public void setBankAddress(String bankAddress) {
this.bankAddress = bankAddress;
}
public String getBankNo() {
return bankNo;
}
public void setBankNo(String bankNo) {
this.bankNo = bankNo;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getAuditPerson() {
return auditPerson;
}
public void setAuditPerson(String auditPerson) {
this.auditPerson = auditPerson;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
} }
\ No newline at end of file
...@@ -373,5 +373,39 @@ public class DateUtils { ...@@ -373,5 +373,39 @@ public class DateUtils {
return cal.getTime(); return cal.getTime();
} }
private static Date getDateAdd(int days){
SimpleDateFormat sf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
c.add(Calendar.DAY_OF_MONTH, -days);
return c.getTime();
}
// 获取过去第几天的日期
public static String getDaysBetwwen(int days) {
List<String> dayss = new ArrayList<>();
Calendar start = Calendar.getInstance();
start.setTime(getDateAdd(days));
Long startTIme = start.getTimeInMillis();
Calendar end = Calendar.getInstance();
end.setTime(new Date());
Long endTime = end.getTimeInMillis();
Long oneDay = 1000 * 60 * 60 * 24l;
Long time = startTIme;
while (time <= endTime) {
Date d = new Date(time);
DateFormat df = new SimpleDateFormat("yyyy-MM-dd");
dayss.add(df.format(d));
time += oneDay;
}
String s = dayss.get(0);
return s;
}
public static int timestamp() {
long time = System.currentTimeMillis();
return (int) (time / 1000);
}
// public static void main(String[] args) {
// System.out.println(timestamp());
// }
} }
...@@ -37,7 +37,18 @@ ...@@ -37,7 +37,18 @@
<groupId>org.springframework.session</groupId> <groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId> <artifactId>spring-session-data-redis</artifactId>
</dependency> </dependency>
<!-- validation校验-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!--加入ampq-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-amqp</artifactId>
</dependency>
<!-- 引入boot-security权限框架 --> <!-- 引入boot-security权限框架 -->
<!-- <!--
<dependency> <dependency>
......
package com.jz.dm.mall.config.rabbitConfig;
import org.springframework.amqp.core.*;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/20
* @Version:
*/
@Configuration
public class RabbitConfig {
//声明队列
@Bean("myQueue")
public Queue myQueue(){
return QueueBuilder.durable("queue.order").build();
}
//声明交换机
@Bean("myExchange")
public Exchange myExchange(){
return ExchangeBuilder.directExchange("exchange.order").build();
}
//声明绑定
@Bean
public Binding myBinding(@Qualifier("myQueue")Queue myQueue,
@Qualifier("myExchange")Exchange myExchange){
return BindingBuilder.bind(myQueue).to(myExchange).with("queue.order").noargs();
}
}
...@@ -3,7 +3,6 @@ package com.jz.dm.mall.moduls.controller.company; ...@@ -3,7 +3,6 @@ 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.CompanyAddReq; import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq; import com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq;
import com.jz.dm.mall.moduls.entity.MallCustomer;
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;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
...@@ -51,8 +50,8 @@ public class CompanyAuthController { ...@@ -51,8 +50,8 @@ public class CompanyAuthController {
*/ */
@GetMapping("/findCompany") @GetMapping("/findCompany")
@ApiOperation(value = "企业认证信息查询") @ApiOperation(value = "企业认证信息查询")
public Mono<Result> selectCompany(@RequestParam(value = "type") String type,HttpServletRequest request) { public Result selectCompany(@RequestParam(value = "type") String type,HttpServletRequest request) {
return Mono.fromSupplier(() ->Result.of_success(companyAuthService.selectCompany(type,request))); return companyAuthService.selectCompany(type,request);
} }
/** /**
* @Description: 企业认证信息更新 * @Description: 企业认证信息更新
...@@ -74,4 +73,18 @@ public class CompanyAuthController { ...@@ -74,4 +73,18 @@ public class CompanyAuthController {
public Mono<Result> checkCompany(HttpServletRequest request) { public Mono<Result> checkCompany(HttpServletRequest request) {
return Mono.fromSupplier(() ->companyAuthService.checkCompanyInfo(request)); return Mono.fromSupplier(() ->companyAuthService.checkCompanyInfo(request));
} }
@GetMapping("/getProvince")
@ApiOperation(value = "获取所有省份")
public Result getProvince() {
Result result = companyAuthService.getProvince();
return result;
}
@PostMapping("/getCity")
@ApiOperation(value = "获取当前省份下的城市")
public Result getCity(@RequestParam(name = "provinceCode") String provinceCode,
@RequestParam(name = "cityCode",required = false) String cityCode) {
return companyAuthService.getCity(provinceCode,cityCode);
}
} }
...@@ -23,45 +23,47 @@ public class CompanyAddReq implements Serializable { ...@@ -23,45 +23,47 @@ public class CompanyAddReq implements Serializable {
@ApiModelProperty(name = "企业名称",required = true) @ApiModelProperty(value = "企业名称",required = true)
@NotNull(message = "企业名称不能为空") @NotNull(message = "企业名称不能为空")
private String departmentName; private String departmentName;
@ApiModelProperty(name = "省",required = true) @ApiModelProperty(value = "省",required = true)
@NotNull(message = "省信息不能为空") @NotNull(message = "省信息不能为空")
private String province; private String province;
@ApiModelProperty(name = "市",required = true) @ApiModelProperty(value = "市",required = true)
@NotNull(message = "市信息不能为空") @NotNull(message = "市信息不能为空")
private String city; private String city;
@ApiModelProperty(name = "公司详细地址",required = true) @ApiModelProperty(value = "公司详细地址",required = true)
@NotNull(message = "公司详细地址不能为空") @NotNull(message = "公司详细地址不能为空")
private String registeredAddress; private String registeredAddress;
@ApiModelProperty(name = "统一社会编码",required = true) @ApiModelProperty(value = "统一社会编码",required = true)
@NotNull(message = "统一社会编码不能为空") @NotNull(message = "统一社会编码不能为空")
private String unifiedCreditCode; private String unifiedCreditCode;
@ApiModelProperty(name = "营业执照照片",required = true) @ApiModelProperty(value = "营业执照照片",required = true)
@NotNull(message = "营业执照照片不能为空") @NotNull(message = "营业执照照片不能为空")
private String businessLicense; private String businessLicense;
@ApiModelProperty(name = "开户银行",required = true) @ApiModelProperty(value = "开户银行",required = true)
@NotNull(message = "开户银行不能为空") @NotNull(message = "开户银行不能为空")
private String bankName; private String bankName;
@ApiModelProperty(name = "银行账户",required = true) @ApiModelProperty(value = "银行账户",required = true)
@NotNull(message = "银行账户不能忍为空") @NotNull(message = "银行账户不能忍为空")
private String bankCardNumber; private String bankCardNumber;
@ApiModelProperty(name = "联系人名称",required = true) @ApiModelProperty(value = "联系人名称",required = true)
@NotNull(message = "联系人名称不能为空") @NotNull(message = "联系人名称不能为空")
private String linkman; private String linkman;
@ApiModelProperty(name = "联系人电话",required = true) @ApiModelProperty(value = "联系人电话",required = true)
@NotNull(message = "联系人电话不能为空") @NotNull(message = "联系人电话不能为空")
private String telephone; private String telephone;
@ApiModelProperty(name = "登录用户id",hidden = true) @ApiModelProperty(value = "登录用户id",hidden = true)
private Long loginId; private Long loginId;
@ApiModelProperty(name = "登录用户名称",hidden = true) @ApiModelProperty(value = "登录用户名称",hidden = true)
private String loginName; private String loginName;
@ApiModelProperty(value = "用户角色 2:卖方,3:买方")
private Long roleId;
} }
...@@ -38,4 +38,6 @@ public class CompanyInfoDto implements Serializable { ...@@ -38,4 +38,6 @@ public class CompanyInfoDto implements Serializable {
private String departmentId; private String departmentId;
@ApiModelProperty(value = "审核状态:01待审核,02已审核,03未通过") @ApiModelProperty(value = "审核状态:01待审核,02已审核,03未通过")
private String auditStatus; private String auditStatus;
@ApiModelProperty(value = "用户角色:2卖方,3买方")
private Long roleId;
} }
package com.jz.dm.mall.moduls.controller.customer; package com.jz.dm.mall.moduls.controller.customer;
import com.jz.common.bean.MallCustomerApiDto;
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.SessionUtils;
import com.jz.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.CustomerRequest;
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;
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.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;
...@@ -20,7 +20,7 @@ import org.springframework.data.redis.core.RedisTemplate; ...@@ -20,7 +20,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils; import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import java.util.Map;
/** /**
...@@ -48,31 +48,10 @@ public class LoginController { ...@@ -48,31 +48,10 @@ public class LoginController {
* @return * @return
*/ */
@PostMapping(value = "/login") @PostMapping(value = "/login")
@ApiOperation(value = "登录功能", notes = "登录功能") @ApiOperation(value = "登陆功能")
public Result<CustomerDto> login(@RequestBody LoginRequest customer, HttpServletRequest request) throws Exception { public Result result(@RequestBody LoginRequest customer) {
String username = customer.getUsername(); Result result = mallCustomerService.loginByUser(customer);
String password = customer.getPassword(); return result;
// 手机
String ph = "^[1][34578]\\d{9}$";
// 如果是手机验证
if (username.matches(ph)) {
CustomerDto mallCustomer = mallCustomerService.selectByPhone(username, request);
request.getSession().getAttribute("mallCustomer");
if (mallCustomer != null) {
if (mallCustomer.getCustomerPhone().equals(username) && mallCustomer.getPassword().equals(password)) {
return new Result<>(true, "登录成功!", StatusCode.OK, mallCustomer);
}
return new Result<>(false, "用户名或密码错误!", StatusCode.ERROR);
}
}
CustomerDto mallCustomer = mallCustomerService.selectByAccount(username, request);
if (mallCustomer != null) {
if (mallCustomer.getCustomerAccount().equals(username) && mallCustomer.getPassword().equals(password)) {
return new Result<>(true, "登录成功!", StatusCode.OK, mallCustomer);
}
}
return new Result<>(false, "用户名或密码错误!", StatusCode.ERROR);
} }
/** /**
......
...@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession; import javax.servlet.http.HttpSession;
import java.util.Map; import java.util.Map;
import java.util.concurrent.TimeUnit;
/** /**
* 商城用户(MallCustomer)表控制层 * 商城用户(MallCustomer)表控制层
...@@ -54,28 +55,8 @@ public class MallCustomerController extends BaseController { ...@@ -54,28 +55,8 @@ public class MallCustomerController extends BaseController {
@PostMapping("/saveCustomer") @PostMapping("/saveCustomer")
@ApiOperation(value = "注册用户", notes = "添加用户") @ApiOperation(value = "注册用户", notes = "添加用户")
public Result saveCustomer(@RequestBody CustomerRequest customer, HttpServletRequest request) throws Exception{ public Result saveCustomer(@RequestBody CustomerRequest customer, HttpServletRequest request) throws Exception{
if (!StringUtils.isEmpty(customer)) { Result result = mallCustomerService.saveCustomer(customer);
String ph = "^[1][34578]\\d{9}$"; return result;
String telephone= customer.getTelephone();
if (telephone.matches(ph)) {
MallCustomer mallCustomer = mallCustomerService.selectByPhone(customer.getTelephone());
if (mallCustomer != null) {
if (mallCustomer.getCustomerPhone().equals(customer.getTelephone())) {
return new Result(false, "手机号相同", StatusCode.ERROR);
}
}
}
// 根据手机号查询用户信息
CustomerDto mallCustomer = mallCustomerService.selectByAccount(customer.getUsername(), request);
if (mallCustomer != null) {
if (mallCustomer.getCustomerAccount().equals(customer.getUsername())) {
return new Result(false, "用户名相同", StatusCode.ERROR);
}
}
mallCustomerService.saveCustomer(customer);
return new Result(true, "注册成功!", StatusCode.OK);
}
return new Result(false, "注册失败!", StatusCode.ERROR);
} }
...@@ -86,9 +67,9 @@ public class MallCustomerController extends BaseController { ...@@ -86,9 +67,9 @@ public class MallCustomerController extends BaseController {
@GetMapping("/getLoginUserName") @GetMapping("/getLoginUserName")
@ApiOperation(value = "获取当前登录用户信息") @ApiOperation(value = "获取当前登录用户信息")
public Result getLoginUserName (HttpServletRequest request) throws Exception{ public Result getLoginUserName (HttpServletRequest request) throws Exception{
// 从session中获取id // 从redis中获取id
try { try {
MallCustomerApiDto mallCustomer = (MallCustomerApiDto) SessionUtils.getUserCurrent(request,"mallCustomer"); MallCustomerApiDto mallCustomer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
// Long customerId = 1L; // Long customerId = 1L;
Long customerId = mallCustomer.getCustomerId(); Long customerId = mallCustomer.getCustomerId();
MallCustomer user = mallCustomerService.selectByUser(customerId); MallCustomer user = mallCustomerService.selectByUser(customerId);
......
package com.jz.dm.mall.moduls.controller.customer;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.PurchaserUserCenterReq;
import com.jz.dm.mall.moduls.mapper.OrderDao;
import com.jz.dm.mall.moduls.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@RestController
@RequestMapping("/purchaser")
@Api(tags = "买方用户--controller")
public class PurchaserController {
@Autowired
private OrderService orderServer;
@PostMapping(value = "/userCenter")
@ApiOperation(value = "买家-用户中心")
public Result<PurchaserUserCenterDto> userCenter(@RequestBody PurchaserUserCenterReq req) {
return orderServer.userCenter(req);
}
}
...@@ -2,6 +2,9 @@ package com.jz.dm.mall.moduls.controller.customer.bean; ...@@ -2,6 +2,9 @@ package com.jz.dm.mall.moduls.controller.customer.bean;
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.io.Serializable;
/** /**
* @ClassName: CustomerDto * @ClassName: CustomerDto
...@@ -11,7 +14,8 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -11,7 +14,8 @@ import io.swagger.annotations.ApiModelProperty;
* @Version 1.0 * @Version 1.0
*/ */
@ApiModel(value = "商城用户--返回参数对象", description = "返回参数对象") @ApiModel(value = "商城用户--返回参数对象", description = "返回参数对象")
public class CustomerDto { @Data
public class CustomerDto implements Serializable {
/** /**
* 用户id * 用户id
...@@ -53,67 +57,6 @@ public class CustomerDto { ...@@ -53,67 +57,6 @@ public class CustomerDto {
@ApiModelProperty(value = "头像") @ApiModelProperty(value = "头像")
private String headPortraitUrl; private String headPortraitUrl;
public String getHeadPortraitUrl() { @ApiModelProperty(value = "角色")
return headPortraitUrl; private String roleId;
}
public void setHeadPortraitUrl(String headPortraitUrl) {
this.headPortraitUrl = headPortraitUrl;
}
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 getAssetsId() {
return assetsId;
}
public void setAssetsId(String assetsId) {
this.assetsId = assetsId;
}
} }
package com.jz.dm.mall.moduls.controller.customer.bean.dto;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@ApiModel(value = "买方用户中心返回参数")
@Data
public class PurchaserUserCenterDto implements Serializable {
/**
* 成交额
*/
@ApiModelProperty(value = "累计收入")
private BigDecimal transactionMoney;
/**
* 成交单数
*/
@ApiModelProperty(value = "企业总数")
private String orderTotal;
/**
* 平均成交额
*/
@ApiModelProperty(value = "平均成交额")
private String meanTransactionMoney;
@ApiModelProperty(value = "企业名称")
private String departmentName;
@ApiModelProperty(value = "企业地址")
private String registeredAddress;
@ApiModelProperty(value = "入驻时间")
private Date creTime;
@ApiModelProperty(value = "账户余额")
private String useMoney;
}
package com.jz.dm.mall.moduls.controller.customer.bean.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@Data
@ApiModel(value = "买方-用户中心交易概述请求参数")
public class PurchaserUserCenterReq implements Serializable {
@ApiModelProperty(value = "天")
private String day;
@ApiModelProperty(value = "周")
private String weeks;
@ApiModelProperty(value = "月")
private String month;
}
...@@ -69,7 +69,6 @@ public class FinanceTradeFlowController extends BaseController { ...@@ -69,7 +69,6 @@ public class FinanceTradeFlowController extends BaseController {
*/ */
@PostMapping(value = "/getAccountMoney") @PostMapping(value = "/getAccountMoney")
@ApiOperation(value = "充值----保存充值金额", notes = "保存充值金额") @ApiOperation(value = "充值----保存充值金额", notes = "保存充值金额")
@ApiParam()
public Result<Object> uptAccountMoney(@RequestBody FinanceCustomerBalanceRequest customerBalanceRequest, HttpServletRequest requset) throws Exception { public Result<Object> uptAccountMoney(@RequestBody FinanceCustomerBalanceRequest customerBalanceRequest, HttpServletRequest requset) throws Exception {
if (StringUtils.isEmpty(customerBalanceRequest.getAssetsId().toString())) { //企业资产id if (StringUtils.isEmpty(customerBalanceRequest.getAssetsId().toString())) { //企业资产id
return Result.error("参数不能为空!"); return Result.error("参数不能为空!");
......
...@@ -33,6 +33,8 @@ public class FinanceCashOutRequest implements Serializable { ...@@ -33,6 +33,8 @@ public class FinanceCashOutRequest implements Serializable {
@ApiModelProperty(value = "提现备注") @ApiModelProperty(value = "提现备注")
private String remark; private String remark;
public Long getAssetsId() { public Long getAssetsId() {
return assetsId; return assetsId;
} }
......
...@@ -5,8 +5,10 @@ import com.jz.common.bean.BaseBeanResponse; ...@@ -5,8 +5,10 @@ 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.utils.Result;
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.DataGoodsListRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
...@@ -27,7 +29,7 @@ import javax.servlet.http.HttpServletRequest; ...@@ -27,7 +29,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 {
/** /**
* 服务对象 * 服务对象
...@@ -35,26 +37,6 @@ public class DataGoodsController extends BaseController { ...@@ -35,26 +37,6 @@ public class DataGoodsController extends BaseController {
@Autowired @Autowired
private DataGoodsService dataGoodsService; private DataGoodsService dataGoodsService;
/**
* 列表查询商品数据
* @param dataGoodsListRequest
* @param httpRequest
* @return
*/
@PostMapping(value = "/findList")
@ApiOperation(value = "分页展示商品列表", notes = "首页点击分类展示商品列表")
public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) {
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<DataGoodsListDto>();
try {
pageInfo = dataGoodsService.findList(dataGoodsListRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
}
/**主键查询数据商品 /**主键查询数据商品
* @param dataGoodsRequest * @param dataGoodsRequest
...@@ -92,17 +74,17 @@ public class DataGoodsController extends BaseController { ...@@ -92,17 +74,17 @@ public class DataGoodsController extends BaseController {
return baseResponse; return baseResponse;
} }
/**新增数据商品 /**修改数据商品
* @param dataGoods * @param dataGoods
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/add") @RequestMapping(method = RequestMethod.POST, value = "/edit")
public BaseBeanResponse<DataGoods> add(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){ public BaseBeanResponse<DataGoods> edit(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>(); BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>();
try { try {
baseBeanResponse = dataGoodsService.add(dataGoods, httpRequest); baseBeanResponse = dataGoodsService.edit(dataGoods, httpRequest);
} catch (Exception e) { } catch (Exception e) {
baseBeanResponse.setMessage("新增失败"); baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE); baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace(); e.printStackTrace();
} }
...@@ -110,22 +92,42 @@ public class DataGoodsController extends BaseController { ...@@ -110,22 +92,42 @@ public class DataGoodsController extends BaseController {
return baseBeanResponse; return baseBeanResponse;
} }
/**修改数据商品 /**
* @param dataGoods * 列表查询商品数据
* @param dataGoodsListRequest
* @param httpRequest
* @return * @return
*/ */
@RequestMapping(method = RequestMethod.POST, value = "/edit") @PostMapping(value = "/findList")
public BaseBeanResponse<DataGoods> edit(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){ @ApiOperation(value = "分页展示商品列表", notes = "首页点击分类展示商品列表")
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>(); public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) {
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<DataGoodsListDto>();
try { try {
baseBeanResponse = dataGoodsService.edit(dataGoods, httpRequest); pageInfo = dataGoodsService.findList(dataGoodsListRequest, httpRequest);
} catch (Exception e) { } catch (Exception e) {
baseBeanResponse.setMessage("修改失败"); pageInfo.setMessage("查询失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE); pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace(); e.printStackTrace();
} }
return pageInfo;
}
return baseBeanResponse;
/**新增数据商品
* @param
* @return
*/
@PostMapping("/apiMakeBySeller")
@ApiOperation(value = "api商品制作-来源url-卖方", notes = "制作第三方api")
public Result uploadApi(@RequestBody DataApiUpReq dataApiUpReq) throws Exception{
Result result = new Result();
try{
result = dataGoodsService.uploadApi(dataApiUpReq);
}catch (Exception e) {
e.printStackTrace();
result.setMsg("商品制作失败!");
}
return result;
} }
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.controller.goods.bean.request;
import com.jz.dm.mall.moduls.entity.DataGoodsApiParams;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.List;
/**
* @ClassName:
* @Author: Carl
* @Date: 2020/12/29
* @Version:
*/
@Data
@ApiModel(value = "数据商品制作--api制作参数对象", description = "api制作参数对象")
public class DataApiUpReq implements Serializable {
/**
* api表
*/
@ApiModelProperty(value = "请求类型 POST/GET/PUT/DELETE")
private String requestType;
@ApiModelProperty(value = "接口地址 ")
private String apiUrl;
@ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId;
@ApiModelProperty(value = "api类型 01:api 02: 数据包")
private String apiType;
@ApiModelProperty(value = "数据名称")
private String dataName;
@ApiModelProperty(value = "商品分类")
private Long categoryId;
@ApiModelProperty(value = "限制次数",required = false)
private Long reqFrequency;
@ApiModelProperty(value = "目标地址",required = false)
private String targetUrl;
@ApiModelProperty(value = "最大页数")
// @NotNull(message = "最大页数不能为空")
private Long pageNumber;
@ApiModelProperty(value = "每页数据量")
// @NotNull(message = "每页数据量不能为空")
private Long pageSize;
@ApiModelProperty(value = "数据描述")
private String dataDesc;
@ApiModelProperty(value = "商品图片")
private String dataPicture;
@ApiModelProperty(value = "价格类型")
private String priceType;
@ApiModelProperty(value = "年(元)")
private BigDecimal yearType;
@ApiModelProperty(value = "季(元)")
private BigDecimal seasonType;
@ApiModelProperty(value = "月(元)")
private BigDecimal monthType;
@ApiModelProperty(value = "次(元)")
private BigDecimal secondType;
@ApiModelProperty(value = "创建人", hidden = true)
private String crePerson;
/**
* 接口需要的参数
*/
@ApiModelProperty(value = "接入类型:对应字典表key",required = true)
@NotNull(message = "接入类型不能为空")
private String joinType;
@ApiModelProperty(value = "api请求协议 HTTP/HTTPS")
@NotNull(message = "api请求协议不能为空")
private String apiProtocl;
@ApiModelProperty(value = "返回类型 json/flow")
@NotNull(message = "返回类型不能为空")
private String returnType;
@ApiModelProperty(value = "加密方式 MD5/RSA")
@NotNull(message = "加密方式不能为空")
private String encryMode;
@ApiModelProperty(value = "是否分页")
@NotNull(message = "是否分页不能为空")
private Boolean page;
// @ApiModelProperty(value = "接口描述",required = false)
// private String apiDesc;
/**
* apiParam
*/
@ApiModelProperty(value = "请求参数")
private List<DataGoodsApiParams> requestParam;
@ApiModelProperty(value = "响应参数")
private List<DataGoodsApiParams> responseParam;
@ApiModelProperty(value = "是否必选")
private String ifRequird;
}
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;
/**
* @author ZC
* @PACKAGE_NAME: com.jz.dm.models.req.make
* @PROJECT_NAME: jz-dm-parent
* @NAME: MakeDataBankApiReq
* @DATE: 2020-12-30/15:32
* @DAY_NAME_SHORT: 周三
* @Description:
**/
@Data
@ApiModel("数据银行api制作")
public class MakeDataBankApiReq implements Serializable {
@ApiModelProperty(value = "传输方式(1为HTTPS,2为HTTP)",required = true)
@NotNull(message = "传输方式不能为空")
public String transMode;
@ApiModelProperty(value = "加密方式0 无,1:MD5 2:RSA",required = true)
@NotNull(message = "加密方式不能为空")
public String signType;
@ApiModelProperty(value = "接入类型:对应字典表key",required = true)
@NotNull(message = "接入类型不能为空")
public String joinType;
@ApiModelProperty(value = "输出类型:flow 流,json json形式",required = true)
@NotNull(message = "输出类型不能为空")
public String outputType;
@ApiModelProperty(value = "是否分页:",required = true)
@NotNull(message = "是否分页不能为空")
public Boolean page;
@ApiModelProperty(value = "限流类型:DAY 按天,MONTH 按月",required = true)
@NotNull(message = "限流类型不能为空")
public String reqType;
@ApiModelProperty(value = "目标地址",required = true)
@NotNull(message = "目标地址不能为空")
public String targetUrl;
@ApiModelProperty(value = "文件id",required = true)
@NotNull(message = "文件id不能为空")
public Long fileId;
@ApiModelProperty(value = "签名",required = true)
@NotNull(message = "签名不能为空")
public String sign;
@ApiModelProperty(value = "限制次数",required = false)
public Long reqFrequency;
@ApiModelProperty(value = "请求地址",required = false)
public String apiPath;
@ApiModelProperty(value = "接口描述",required = false)
public String apiDesc;
@ApiModelProperty(value = "超时时间",required = false)
public String timeout;
@ApiModelProperty(value = "api描述",required = false)
public String apiFunction;
@ApiModelProperty(value = "请求头",required = false)
public String reqHeaders;
@ApiModelProperty(value = "请求参数",required = false)
public String requestParam;
@ApiModelProperty(value = "响应参数",required = false)
public String responseParam;
@ApiModelProperty(value = "响应状态码",required = false)
public String respCode;
@ApiModelProperty(value = "api样例",required = false)
public String apiExample;
@ApiModelProperty(value = "创建用户",required = false)
public String createUser;
}
package com.jz.dm.mall.moduls.controller.order; package com.jz.dm.mall.moduls.controller.order;
import com.baomidou.mybatisplus.core.metadata.IPage;
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.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.order.bean.OrderDto; import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.controller.order.bean.OrderRequest;
import com.jz.dm.mall.moduls.controller.order.bean.SaltResetReq;
import com.jz.dm.mall.moduls.service.OrderService; import com.jz.dm.mall.moduls.service.OrderService;
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.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
...@@ -54,6 +54,24 @@ public class OrderController { ...@@ -54,6 +54,24 @@ public class OrderController {
return pageInfo; return pageInfo;
} }
@PostMapping(value = "/listBySeller")
@ApiOperation(value = "订单管理列表(分页查询)-- 卖方", notes = "订单列表(分页查询)")
public Result<IPage<OrderBySellerDto>> queryPageListBySeller(@RequestBody OrderRequest req, HttpServletRequest httpServletRequest) throws Exception {
return orderService.queryPageListBySeller(req, httpServletRequest);
}
@PostMapping(value = "/listByPurchaser")
@ApiOperation(value = "订单管理(条件分页查询)--买方", notes = "订单管理(条件分页查询)")
public PageInfoResponse<OrderByPurchaserDto> queryPageListByPurchaser(@RequestBody OrderRequest req) {
return orderService.queryPageListByPurchaser(req);
}
@GetMapping(value = "/getApiKey")
@ApiOperation(value = "获取当前用户的apiKey--调用接口")
public Result getApiKey() {
return orderService.getApiKey();
}
/** /**
* 根据订单主键查询,订单详情 * 根据订单主键查询,订单详情
* *
......
package com.jz.dm.mall.moduls.controller.order.bean;
import io.swagger.annotations.ApiModelProperty;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/21
* @Version:
*/
public class OrderByPurchaserDetailDto {
}
package com.jz.dm.mall.moduls.controller.order.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/20
* @Version:
*/
@ApiModel(value = "订单管理-条件分页列表-买方")
@Data
public class OrderByPurchaserDto implements Serializable {
@ApiModelProperty(value = "商品名称")
private String dataName;
@ApiModelProperty(value = "调用数")
private String invokingNumber;
@ApiModelProperty(value = "错误率")
private String errorRate;
@ApiModelProperty(value = "价格")
private String orderMoney;
@ApiModelProperty(value = "价格类型")
private String priceType;
@ApiModelProperty(value = "盐值")
private String saltValue;
@ApiModelProperty(value = "授权码")
private String requestToken;
}
package com.jz.dm.mall.moduls.controller.order.bean;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@ApiModel(value = "卖家中心-订单详情返回参数")
@Data
public class OrderBySellerDetailDto implements Serializable {
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private String orderNumber;
/**
* 数据名称
*/
@ApiModelProperty(value = "数据名称")
private String dataName;
/**
* 数据分类
*/
@ApiModelProperty(value = "数据分类")
private String dataType;
/**
* 订单状态:01待支付,02已支付,03已取消
*/
@ApiModelProperty(value = "订单状态:01待支付,02已支付,03已取消")
private String orderStatus;
/**
* 订单时间
*/
@ApiModelProperty(value = "订单时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date orderTime;
/**
* 订单金额
*/
@ApiModelProperty(value = "订单金额")
private BigDecimal orderMoney;
/**
* 卖家id
*/
@ApiModelProperty(value = "卖家id")
private Long sellerId;
/**
* 支付金额
*/
@ApiModelProperty(value = "支付金额")
private BigDecimal paymentMoney;
/**
* 支付时间
*/
@ApiModelProperty(value = "支付时间")
private Date paymentTime;
/**
* 支付方式:01余额
*/
@ApiModelProperty(value = "支付方式:01余额")
private String paymentMethod;
/**
* 优惠金额
*/
@ApiModelProperty(value = "优惠金额")
private BigDecimal districtMoney;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
@ApiModelProperty(value = "购买方式:01年,02季,03月,04次(服务类型)")
private String purchaseMethod;
/**
* 商品token
*/
private String goodsToken;
/**
* 盐值
*/
@ApiModelProperty(value = "盐值")
private String saltValue;
/**
* apikey
*/
@ApiModelProperty(value = "apikey")
private String apiKey;
/**
* 生效日期
*/
@ApiModelProperty(value = "生效日期")
private Date takeEffectTime;
/**
* 失效日期
*/
@ApiModelProperty(value = "失效日期")
private Date invalidTime;
@ApiModelProperty(value = "有效期")
private String indate;
/**
* 价格类型:01免费,02收费
*/
private String priceType;
/**
* 创建人
*/
private String crePerson;
/**
* 创建时间
*/
private Date creTime;
/**
* 更新时间
*/
private Date uptTime;
/**
* 更新人
*/
private String uptPerson;
/**
* 删除标识
*/
private String delFlag;
}
package com.jz.dm.mall.moduls.controller.order.bean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@ApiModel(value = "卖家-订单返回参数")
@Data
public class OrderBySellerDto implements Serializable {
/**
* 订单id
*/
@ApiModelProperty(value = "订单id")
private Long orderId;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private String orderNumber;
@ApiModelProperty(value = "商品名称")
private String dataName;
@ApiModelProperty(value = "企业名")
private String departmentName;
/**
* 订单状态:01待支付,02已支付,03已取消
*/
@ApiModelProperty(value = "订单状态:01待支付,02已支付,03已取消")
private String orderStatus;
/**
* 订单时间
*/
@ApiModelProperty(value = "订单时间")
private String orderTime;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
@ApiModelProperty(value = "购买方式:01年,02季,03月,04次(服务类型)")
private String purchaseMethod;
}
package com.jz.dm.mall.moduls.controller.order.bean;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/19
* @Version:
*/
@Data
@ApiModel(value = "卖家-api订单请求参数")
public class OrderBySellerReq extends BasePageBean {
/**
* 订单id
*/
@ApiModelProperty(value = "订单id")
private Long orderId;
/**
* 订单编号
*/
@ApiModelProperty(value = "订单编号")
private String orderNumber;
@ApiModelProperty(value = "企业名")
private Long departmentName;
/**
* 订单状态:01待支付,02已支付,03已取消
*/
@ApiModelProperty(value = "订单状态:01待支付,02已支付,03已取消")
private String orderStatus;
/**
* 订单时间
*/
@ApiModelProperty(value = "订单时间")
private String orderTime;
/**
* 购买方式:01年,02季,03月,04次(服务类型)
*/
@ApiModelProperty(value = "购买方式:01年,02季,03月,04次(服务类型)")
private String purchaseMethod;
@ApiModelProperty(value = "搜索条件")
private String search;
}
package com.jz.dm.mall.moduls.controller.order.bean; package com.jz.dm.mall.moduls.controller.order.bean;
import com.fasterxml.jackson.annotation.JsonFormat; import com.fasterxml.jackson.annotation.JsonFormat;
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.io.Serializable;
import java.math.BigDecimal; import java.math.BigDecimal;
import java.util.Date; import java.util.Date;
...@@ -14,8 +17,9 @@ import java.util.Date; ...@@ -14,8 +17,9 @@ import java.util.Date;
* @since 2020-12-01 10:41:40 * @since 2020-12-01 10:41:40
*/ */
@ApiModel @ApiModel(value = "订单管理-列表展示")
public class OrderDto { @Data
public class OrderDto implements Serializable {
private static final long serialVersionUID = 651546246975691600L; private static final long serialVersionUID = 651546246975691600L;
/** /**
* 订单id * 订单id
...@@ -46,7 +50,7 @@ public class OrderDto { ...@@ -46,7 +50,7 @@ public class OrderDto {
* 订单时间 * 订单时间
*/ */
@ApiModelProperty(value = "订单时间") @ApiModelProperty(value = "订单时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss") @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date orderTime; private Date orderTime;
/** /**
* 卖家id * 卖家id
...@@ -140,213 +144,4 @@ public class OrderDto { ...@@ -140,213 +144,4 @@ public class OrderDto {
*/ */
@ApiModelProperty(value = "数据分类") @ApiModelProperty(value = "数据分类")
private String dataType; private String dataType;
public String getIndate() {
return indate;
}
public void setIndate(String indate) {
this.indate = indate;
}
public Long getOrderId() {
return orderId;
}
public void setOrderId(Long orderId) {
this.orderId = orderId;
}
public String getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public Long getCustomerId() {
return customerId;
}
public void setCustomerId(Long customerId) {
this.customerId = customerId;
}
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 Long getSellerId() {
return sellerId;
}
public void setSellerId(Long sellerId) {
this.sellerId = sellerId;
}
public BigDecimal getPaymentMoney() {
return paymentMoney;
}
public void setPaymentMoney(BigDecimal paymentMoney) {
this.paymentMoney = paymentMoney;
}
public Date getPaymentTime() {
return paymentTime;
}
public void setPaymentTime(Date paymentTime) {
this.paymentTime = paymentTime;
}
public String getPaymentMethod() {
return paymentMethod;
}
public void setPaymentMethod(String paymentMethod) {
this.paymentMethod = paymentMethod;
}
public BigDecimal getDistrictMoney() {
return districtMoney;
}
public void setDistrictMoney(BigDecimal districtMoney) {
this.districtMoney = districtMoney;
}
public String getPurchaseMethod() {
return purchaseMethod;
}
public void setPurchaseMethod(String purchaseMethod) {
this.purchaseMethod = purchaseMethod;
}
public String getGoodsToken() {
return goodsToken;
}
public void setGoodsToken(String goodsToken) {
this.goodsToken = goodsToken;
}
public String getSaltValue() {
return saltValue;
}
public void setSaltValue(String saltValue) {
this.saltValue = saltValue;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Date getTakeEffectTime() {
return takeEffectTime;
}
public void setTakeEffectTime(Date takeEffectTime) {
this.takeEffectTime = takeEffectTime;
}
public Date getInvalidTime() {
return invalidTime;
}
public void setInvalidTime(Date invalidTime) {
this.invalidTime = invalidTime;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
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 getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
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;
}
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.controller.order.bean; ...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.controller.order.bean;
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;
/** /**
* 订单表(TOrder)实体类 * 订单表(TOrder)实体类
...@@ -11,7 +12,8 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -11,7 +12,8 @@ import io.swagger.annotations.ApiModelProperty;
* @since 2020-12-01 10:41:40 * @since 2020-12-01 10:41:40
*/ */
@ApiModel @ApiModel(value = "订单管理-api订单列表请求参数")
@Data
public class OrderRequest extends BasePageBean { public class OrderRequest extends BasePageBean {
private static final long serialVersionUID = 651546246975691600L; private static final long serialVersionUID = 651546246975691600L;
/** /**
...@@ -39,45 +41,11 @@ public class OrderRequest extends BasePageBean { ...@@ -39,45 +41,11 @@ public class OrderRequest extends BasePageBean {
*/ */
@ApiModelProperty(value = "数据分类") @ApiModelProperty(value = "数据分类")
private String dataType; private String dataType;
@ApiModelProperty(value = "订单时间")
private String orderTime;
@ApiModelProperty(value = "价格类型")
private String priceType;
@ApiModelProperty(value = "搜索")
public String getDataName() { private String search;
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 getOrderNumber() {
return orderNumber;
}
public void setOrderNumber(String orderNumber) {
this.orderNumber = orderNumber;
}
public String getCategoryId() {
return categoryId;
}
public void setCategoryId(String categoryId) {
this.categoryId = categoryId;
}
public String getPurchaseMethod() {
return purchaseMethod;
}
public void setPurchaseMethod(String purchaseMethod) {
this.purchaseMethod = purchaseMethod;
}
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/16
* @Version:
*/
@Data
@TableName("t_city")
@ApiModel("城市")
public class City implements Serializable {
private static final long serialVersionUID = -3596309983779919750L;
private Long id;
private String name;
private String city_code;
private String province_code;
}
...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.entity; ...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.entity;
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.math.BigDecimal; import java.math.BigDecimal;
...@@ -15,6 +16,7 @@ import java.util.Date; ...@@ -15,6 +16,7 @@ import java.util.Date;
*/ */
@TableName("t_data_goods") @TableName("t_data_goods")
@ApiModel @ApiModel
@Data
public class DataGoods implements Serializable { public class DataGoods implements Serializable {
private static final long serialVersionUID = 938517475031285541L; private static final long serialVersionUID = 938517475031285541L;
/** /**
...@@ -122,213 +124,6 @@ public class DataGoods implements Serializable { ...@@ -122,213 +124,6 @@ public class DataGoods implements Serializable {
*/ */
private BigDecimal secondType; private BigDecimal secondType;
private String apiOpenid;
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public Long getCategoryId() {
return categoryId;
}
public void setCategoryId(Long categoryId) {
this.categoryId = categoryId;
}
public Long getUserId() {
return userId;
}
public void setUserId(Long userId) {
this.userId = userId;
}
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 getDataLabel() {
return dataLabel;
}
public void setDataLabel(String dataLabel) {
this.dataLabel = dataLabel;
}
public String getDataPicture() {
return dataPicture;
}
public void setDataPicture(String dataPicture) {
this.dataPicture = dataPicture;
}
public BigDecimal getDataPrice() {
return dataPrice;
}
public void setDataPrice(BigDecimal dataPrice) {
this.dataPrice = dataPrice;
}
public BigDecimal getDiscountPrice() {
return discountPrice;
}
public void setDiscountPrice(BigDecimal discountPrice) {
this.discountPrice = discountPrice;
}
public String getPriceType() {
return priceType;
}
public void setPriceType(String priceType) {
this.priceType = priceType;
}
public String getGoodsStandards() {
return goodsStandards;
}
public void setGoodsStandards(String goodsStandards) {
this.goodsStandards = goodsStandards;
}
public String getDataStatus() {
return dataStatus;
}
public void setDataStatus(String dataStatus) {
this.dataStatus = dataStatus;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getCleanRule() {
return cleanRule;
}
public void setCleanRule(String cleanRule) {
this.cleanRule = cleanRule;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
public String getAuditPerson() {
return auditPerson;
}
public void setAuditPerson(String auditPerson) {
this.auditPerson = auditPerson;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public Date getUptTime() {
return uptTime;
}
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public BigDecimal getYearType() {
return yearType;
}
public void setYearType(BigDecimal yearType) {
this.yearType = yearType;
}
public BigDecimal getSeasonType() {
return seasonType;
}
public void setSeasonType(BigDecimal seasonType) {
this.seasonType = seasonType;
}
public BigDecimal getMonthType() {
return monthType;
}
public void setMonthType(BigDecimal monthType) {
this.monthType = monthType;
}
public BigDecimal getSecondType() {
return secondType;
}
public void setSecondType(BigDecimal secondType) {
this.secondType = secondType;
}
} }
\ 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.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 java.io.Serializable; import java.io.Serializable;
import java.util.Date; import java.util.Date;
...@@ -14,11 +18,14 @@ import java.util.Date; ...@@ -14,11 +18,14 @@ import java.util.Date;
*/ */
@TableName("t_data_goods_api") @TableName("t_data_goods_api")
@ApiModel @ApiModel
@Data
public class DataGoodsApi implements Serializable { public class DataGoodsApi implements Serializable {
private static final long serialVersionUID = -14346819849726413L; private static final long serialVersionUID = -14346819849726413L;
/** /**
* api商品id * api商品id
*/ */
@ApiModelProperty(value = "主健ID")
@TableId(value = "id", type = IdType.AUTO)
private Long goodsApi; private Long goodsApi;
/** /**
* 数据id * 数据id
...@@ -81,133 +88,23 @@ public class DataGoodsApi implements Serializable { ...@@ -81,133 +88,23 @@ public class DataGoodsApi implements Serializable {
*/ */
private String delFlag; private String delFlag;
/**
* 加密方式
*/
private String encryMode;
public Long getGoodsApi() { /**
return goodsApi; * 传输方式
} */
private String transMode;
public void setGoodsApi(Long goodsApi) {
this.goodsApi = goodsApi;
}
public Long getDataGoodsId() {
return dataGoodsId;
}
public void setDataGoodsId(Long dataGoodsId) {
this.dataGoodsId = dataGoodsId;
}
public String getApiName() {
return apiName;
}
public void setApiName(String apiName) {
this.apiName = apiName;
}
public String getRequestType() {
return requestType;
}
public void setRequestType(String requestType) {
this.requestType = requestType;
}
public String getApiUrl() {
return apiUrl;
}
public void setApiUrl(String apiUrl) {
this.apiUrl = apiUrl;
}
public String getApiMethod() {
return apiMethod;
}
public void setApiMethod(String apiMethod) {
this.apiMethod = apiMethod;
}
public String getApiProtocl() {
return apiProtocl;
}
public void setApiProtocl(String apiProtocl) {
this.apiProtocl = apiProtocl;
}
public String getReturnDataExample() {
return returnDataExample;
}
public void setReturnDataExample(String returnDataExample) {
this.returnDataExample = returnDataExample;
}
public String getRequestExample() {
return requestExample;
}
public void setRequestExample(String requestExample) {
this.requestExample = requestExample;
}
public String getReturnType() {
return returnType;
}
public void setReturnType(String returnType) {
this.returnType = returnType;
}
public String getApiKey() {
return apiKey;
}
public void setApiKey(String apiKey) {
this.apiKey = apiKey;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public String getUptPerson() {
return uptPerson;
}
public void setUptPerson(String uptPerson) {
this.uptPerson = uptPerson;
}
public Date getUptTime() { /**
return uptTime; * 版本号
} */
private String versionNumber;
public void setUptTime(Date uptTime) { private String apiType;
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;
import com.baomidou.mybatisplus.annotation.IdType;
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;
/**
* api商品参数配置(TDataGoodsApiParams)实体类
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
@TableName("t_data_goods_api_params")
@ApiModel
@Data
public class DataGoodsApiParams implements Serializable {
private static final long serialVersionUID = 944366688061324185L;
/**
* api参数id
*/
@ApiModelProperty("主健ID")
@TableId(value = "id", type = IdType.AUTO)
private Long apiParamsId;
/**
* api商品id
*/
@ApiModelProperty(value = "api商品id")
private Long goodsApi;
/**
* 参数分类:01公共参数,02请求参数,03响应参数,04请求头参数,05状态码参数
*/
@ApiModelProperty(value = "参数分类")
private String paramsDiff;
/**
* 参数名称
*/
@ApiModelProperty(value = "参数名称")
private String paramsName;
/**
* 参数类型
*/
@ApiModelProperty(value = "参数类型")
private String paramsType;
/**
* 参数描述
*/
@ApiModelProperty(value = "参数描述")
private String paramsDesc;
/**
* 默认值
*/
@ApiModelProperty(value = "默认值")
private String defaultValue;
/**
* 备注
*/
@ApiModelProperty(value = "备注")
private String remark;
/**
* 是否必选:Y是,N否
*/
@ApiModelProperty(value = "是否必选")
private String ifRequird;
/**
* 删除标识:Y是,N否
*/
@ApiModelProperty(value = "删除标识")
private String delFlag;
/**
* 创建时间
*/
@ApiModelProperty(value = "创建时间")
private Date creTime;
@ApiModelProperty(value = "创建人")
private String crePerson;
/**
* 更新时间
*/
@ApiModelProperty(value = "更新时间")
private Date uptTime;
}
\ No newline at end of file
...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.entity; ...@@ -2,6 +2,7 @@ package com.jz.dm.mall.moduls.entity;
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.math.BigDecimal; import java.math.BigDecimal;
...@@ -15,6 +16,7 @@ import java.util.Date; ...@@ -15,6 +16,7 @@ import java.util.Date;
*/ */
@TableName("t_finance_customer_balance") @TableName("t_finance_customer_balance")
@ApiModel @ApiModel
@Data
public class FinanceCustomerBalance implements Serializable { public class FinanceCustomerBalance implements Serializable {
private static final long serialVersionUID = -13102196689933511L; private static final long serialVersionUID = -13102196689933511L;
/** /**
...@@ -55,76 +57,6 @@ public class FinanceCustomerBalance implements Serializable { ...@@ -55,76 +57,6 @@ public class FinanceCustomerBalance implements Serializable {
private String rejectReason; private String rejectReason;
public Long getCustomerBalanceId() { private Date balanceTime;
return customerBalanceId;
}
public void setCustomerBalanceId(Long customerBalanceId) {
this.customerBalanceId = customerBalanceId;
}
public Long getAssetsId() {
return assetsId;
}
public void setAssetsId(Long assetsId) {
this.assetsId = assetsId;
}
public BigDecimal getBalanceMoney() {
return balanceMoney;
}
public void setBalanceMoney(BigDecimal balanceMoney) {
this.balanceMoney = balanceMoney;
}
public String getRemark() {
return remark;
}
public void setRemark(String remark) {
this.remark = remark;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public String getCrePerson() {
return crePerson;
}
public void setCrePerson(String crePerson) {
this.crePerson = crePerson;
}
public String getDelFlag() {
return delFlag;
}
public void setDelFlag(String delFlag) {
this.delFlag = delFlag;
}
public String getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public String getRejectReason() {
return rejectReason;
}
public void setRejectReason(String rejectReason) {
this.rejectReason = rejectReason;
}
} }
\ No newline at end of file
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 io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/16
* @Version:
*/
@ApiModel
@Data
@TableName("t_mall_user_role")
public class MallUserRole implements Serializable {
private static final long serialVersionUID = 5093676200943796700L;
@TableId(value = "customer_role_id",type = IdType.AUTO)
private Long customerRoleId;
@ApiModelProperty(value = "用户id")
private Long customerId;
@ApiModelProperty(value = "角色id")
private Long roleId;
}
package com.jz.dm.mall.moduls.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/16
* @Version:
*/
@ApiModel("省份")
@Data
@TableName("t_province")
public class Province implements Serializable {
private static final long serialVersionUID = 9158685111236565881L;
private Long id;
private String name;
private String provinceCode;
}
package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.entity.DataGoodsApiParams;
/**
* api商品参数配置(TDataGoodsApiParams)表数据库访问层
*
* @author Bellamy
* @since 2020-12-01 10:41:31
*/
public interface DataGoodsApiParamsDao extends BaseMapper<DataGoodsApiParams> {
}
\ No newline at end of file
...@@ -2,12 +2,18 @@ package com.jz.dm.mall.moduls.mapper; ...@@ -2,12 +2,18 @@ package com.jz.dm.mall.moduls.mapper;
import com.jz.common.base.BaseMapper; import com.jz.common.base.BaseMapper;
import com.jz.common.entity.Department; import com.jz.common.entity.Department;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq; import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto; import com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.entity.City;
import com.jz.dm.mall.moduls.entity.Province;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultType; import org.apache.ibatis.annotations.ResultType;
import org.apache.ibatis.annotations.Select; import org.apache.ibatis.annotations.Select;
import java.util.List;
/** /**
* 企业(TDepartment)表数据库访问层 * 企业(TDepartment)表数据库访问层
* *
...@@ -45,4 +51,23 @@ public interface DepartmentDao extends BaseMapper<Department> { ...@@ -45,4 +51,23 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @return * @return
*/ */
int insertDepart(@Param("dep") Department dep); int insertDepart(@Param("dep") Department dep);
/**
* 获取省份
* @return
*/
List<Province> selectAll();
/**
* 获取城市
* @param provinceCode
* @return
*/
List<City> selectByCity(@Param(value = "provinceCode") String provinceCode);
List<String> getAreaList(@Param("provinceCode") String provinceCode, @Param("cityCode")String cityCode);
List<String> getCityList(@Param(value = "provinceCode") String provinceCode);
PurchaserUserCenterDto selectByBasic(@Param("customerId") Long customerId);
} }
\ No newline at end of file
...@@ -28,8 +28,8 @@ public interface FinanceCustomerAssetsDao extends BaseMapper<FinanceCustomerAsse ...@@ -28,8 +28,8 @@ public interface FinanceCustomerAssetsDao extends BaseMapper<FinanceCustomerAsse
FinanceCustomerAssets findById(@Param("assetsId")Long assetsId); FinanceCustomerAssets findById(@Param("assetsId")Long assetsId);
void updateAssets(FinanceCustomerAssets assets); int updateAssets(FinanceCustomerAssets assets);
// 修改金额 // 修改金额
void updateMoney(FinanceCustomerAssets assets) throws Exception; int updateMoney(FinanceCustomerAssets assets) throws Exception;
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper; 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.dm.mall.moduls.controller.customer.bean.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto;
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 org.apache.ibatis.annotations.Insert; import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -71,4 +73,20 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> { ...@@ -71,4 +73,20 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
*/ */
List<MallMenu> getMenu(@Param("userId") Long userId, List<MallMenu> getMenu(@Param("userId") Long userId,
@Param("roleId") Long roleId); @Param("roleId") Long roleId);
int addRole(MallUserRole role);
/**
* 查询当前用户身份
* @param customerId
* @return
*/
MallUserRole findByRoleId(@Param("customerId") Long customerId);
/**
* 查询当前用户
* @param map
* @return
*/
MallCustomerApiDto selectByUser(Map map);
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.mapper; package com.jz.dm.mall.moduls.mapper;
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.order.bean.DataGoodsApiDto; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto; import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.controller.order.bean.OrderDto; import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.entity.Order; import com.jz.dm.mall.moduls.entity.Order;
import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Param;
...@@ -46,4 +48,13 @@ public interface OrderDao extends BaseMapper<Order> { ...@@ -46,4 +48,13 @@ public interface OrderDao extends BaseMapper<Order> {
* @param order * @param order
*/ */
void updateSalt(Order order); void updateSalt(Order order);
IPage<OrderBySellerDto> queryPageListBySeller(IPage<OrderBySellerDto> page, @Param("ew") QueryWrapper<OrderBySellerDto> query);
PurchaserUserCenterDto getMoneyAndOrderTotalDto(Map map);
List<String> getApiKey(@Param(value = "customerId") Long customerId);
List<OrderByPurchaserDto> queryPageListByPurchaser(Map<String, Object> param);
} }
\ No newline at end of file
...@@ -50,4 +50,7 @@ public interface CompanyAuthService { ...@@ -50,4 +50,7 @@ public interface CompanyAuthService {
*/ */
Result checkCompanyInfo(HttpServletRequest request); Result checkCompanyInfo(HttpServletRequest request);
Result getProvince();
Result getCity(String provinceCode,String cityCode);
} }
...@@ -4,8 +4,10 @@ import com.jz.common.bean.BaseBeanResponse; ...@@ -4,8 +4,10 @@ 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.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.DataGoodsListRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsListRequest;
import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest; import com.jz.dm.mall.moduls.controller.goods.bean.request.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods; import com.jz.dm.mall.moduls.entity.DataGoods;
...@@ -32,7 +34,7 @@ public interface DataGoodsService { ...@@ -32,7 +34,7 @@ public interface DataGoodsService {
/**新增数据商品 /**新增数据商品
* @param DataGoods * @param
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
...@@ -40,7 +42,7 @@ public interface DataGoodsService { ...@@ -40,7 +42,7 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoods> add(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception; public BaseBeanResponse<DataGoods> add(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception;
/**主键查询数据商品 /**主键查询数据商品
* @param DataGoodsRequest * @param
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
...@@ -48,7 +50,7 @@ public interface DataGoodsService { ...@@ -48,7 +50,7 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoodsDto> findById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception; public BaseBeanResponse<DataGoodsDto> findById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception;
/**修改数据商品 /**修改数据商品
* @param DataGoods * @param
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
...@@ -56,11 +58,16 @@ public interface DataGoodsService { ...@@ -56,11 +58,16 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoods> edit(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception; public BaseBeanResponse<DataGoods> edit(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception;
/**主键删除数据商品 /**主键删除数据商品
* @param DataGoodsRequest * @param
* @param httpRequest * @param httpRequest
* @return * @return
* @throws Exception * @throws Exception
*/ */
public BaseResponse deleteById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception; public BaseResponse deleteById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception;
/**
* 自营数据-上传api
* @param dataApiUpReq
*/
Result uploadApi(DataApiUpReq dataApiUpReq)throws Exception;
} }
\ No newline at end of file
...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.service; ...@@ -3,6 +3,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.customer.bean.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.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.LoginRequest;
import com.jz.dm.mall.moduls.entity.MallCustomer; import com.jz.dm.mall.moduls.entity.MallCustomer;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -34,7 +35,7 @@ public interface MallCustomerService { ...@@ -34,7 +35,7 @@ public interface MallCustomerService {
* 注册账号 * 注册账号
* @param customerRequest * @param customerRequest
*/ */
void saveCustomer(CustomerRequest customerRequest); Result saveCustomer(CustomerRequest customerRequest);
/** /**
* 通过手机号查询是否已注册 * 通过手机号查询是否已注册
...@@ -65,6 +66,13 @@ public interface MallCustomerService { ...@@ -65,6 +66,13 @@ public interface MallCustomerService {
*/ */
Result getMenu(Long userId, Long roleId); Result getMenu(Long userId, Long roleId);
/**
* 登陆
* @param customer
* @return
*/
Result loginByUser(LoginRequest customer);
// /** // /**
// * 忘记密码 // * 忘记密码
// * @param customer // * @param customer
......
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.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.order.bean.OrderDto; import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.controller.order.bean.OrderRequest; import com.jz.dm.mall.moduls.controller.customer.bean.req.PurchaserUserCenterReq;
import com.jz.dm.mall.moduls.controller.order.bean.SaltResetReq; import com.jz.dm.mall.moduls.controller.order.bean.*;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Map; import java.util.Map;
...@@ -30,4 +31,13 @@ public interface OrderService { ...@@ -30,4 +31,13 @@ public interface OrderService {
* @return * @return
*/ */
Result updateSalt(SaltResetReq req); Result updateSalt(SaltResetReq req);
Result<IPage<OrderBySellerDto>> queryPageListBySeller(OrderRequest req, HttpServletRequest httpServletRequest);
Result<PurchaserUserCenterDto> userCenter(PurchaserUserCenterReq req);
PageInfoResponse<OrderByPurchaserDto> queryPageListByPurchaser(OrderRequest req);
Result getApiKey();
} }
\ No newline at end of file
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.jz.common.base.CurrentUser; 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.ResultCode;
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.UserTypeEnum;
import com.jz.common.exception.ResponseException; import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq; import com.jz.dm.mall.moduls.controller.company.bean.CompanyUpdateReq;
import com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto; import com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto;
import com.jz.dm.mall.moduls.entity.FinanceCustomerAssets; import com.jz.dm.mall.moduls.entity.*;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq; import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import com.jz.dm.mall.moduls.mapper.DepartmentDao; import com.jz.dm.mall.moduls.mapper.DepartmentDao;
...@@ -20,6 +18,8 @@ import com.jz.dm.mall.moduls.mapper.MallCustomerDao; ...@@ -20,6 +18,8 @@ import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
import com.jz.dm.mall.moduls.service.CompanyAuthService; import com.jz.dm.mall.moduls.service.CompanyAuthService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
...@@ -30,7 +30,9 @@ import org.springframework.transaction.annotation.Transactional; ...@@ -30,7 +30,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource; import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.util.Date; import java.util.Date;
import java.util.concurrent.TimeUnit; import java.util.HashMap;
import java.util.List;
import java.util.Map;
/** /**
* @author ZC * @author ZC
...@@ -45,7 +47,7 @@ import java.util.concurrent.TimeUnit; ...@@ -45,7 +47,7 @@ import java.util.concurrent.TimeUnit;
@Service("companyAuthService") @Service("companyAuthService")
@Slf4j @Slf4j
public class CompanyAuthServiceImpl implements CompanyAuthService { public class CompanyAuthServiceImpl implements CompanyAuthService {
private static final Logger logger = LoggerFactory.getLogger(CompanyAuthServiceImpl.class);
@Resource @Resource
private DepartmentDao departmentDao; private DepartmentDao departmentDao;
@Resource @Resource
...@@ -65,7 +67,14 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -65,7 +67,14 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
public Result addCompanyData(CompanyAddReq req, HttpServletRequest request) { public Result addCompanyData(CompanyAddReq req, HttpServletRequest request) {
//获取当前用户ID判断当前用户是否已经关联企业 //获取当前用户ID判断当前用户是否已经关联企业
MallCustomerApiDto currentUser = getUser(); MallCustomerApiDto currentUser = getUser();
// 查询当前用户身份
MallUserRole role = mallCustomerDao.findByRoleId(currentUser.getCustomerId());
if (role != null && role.getRoleId().toString().split(",").length > 1) {
return Result.of_error("已成为卖家/买家!请勿重复操作!");
}
if (role != null && req.getRoleId().equals(role.getRoleId())) {
return Result.of_error("已重复成为卖家/买家!请勿重复操作!");
}
if (null == currentUser) { if (null == currentUser) {
return Result.of_error(ResultMsg.USER_NOT_EXIST); return Result.of_error(ResultMsg.USER_NOT_EXIST);
} }
...@@ -76,6 +85,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -76,6 +85,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
if (null != mallCustomer.getDepartmentId()) { if (null != mallCustomer.getDepartmentId()) {
return Result.of_error("用户已关联企业,请勿重复操作"); return Result.of_error("用户已关联企业,请勿重复操作");
} }
req.setLoginId(mallCustomer.getCustomerId()); req.setLoginId(mallCustomer.getCustomerId());
req.setLoginName(currentUser.getCustomerName()); req.setLoginName(currentUser.getCustomerName());
if (StringUtils.isNotBlank(req.getDepartmentName()) || if (StringUtils.isNotBlank(req.getDepartmentName()) ||
...@@ -85,7 +95,11 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -85,7 +95,11 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return Result.of_error("企业用户信息已存在"); return Result.of_error("企业用户信息已存在");
} }
} }
insetCompany(req);
Boolean aBoolean = insetCompany(req);
if (!aBoolean) {
throw ResponseException.of_error("添加失败");
}
return Result.of_success(ResultMsg.SUCCESS); return Result.of_success(ResultMsg.SUCCESS);
} }
...@@ -151,9 +165,9 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -151,9 +165,9 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return Result.of_error("更新企业用户信息与绑定企业信息不一致"); return Result.of_error("更新企业用户信息与绑定企业信息不一致");
} }
Department department = new Department(); Department department = new Department();
BeanUtils.copyProperties(req, department);
department.setUptTime(new Date()); department.setUptTime(new Date());
department.setUptPerson(req.getLoginName()); department.setUptPerson(req.getLoginName());
BeanUtils.copyProperties(req, department);
if (departmentDao.updateById(department) != 1) { if (departmentDao.updateById(department) != 1) {
throw ResponseException.of_error("更新企业信息失败"); throw ResponseException.of_error("更新企业信息失败");
} }
...@@ -176,7 +190,45 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -176,7 +190,45 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
if (null != companyInfoDto && "02".equals(companyInfoDto.getAuditStatus())) { if (null != companyInfoDto && "02".equals(companyInfoDto.getAuditStatus())) {
return Result.of_success("用户已进行企业认证"); return Result.of_success("用户已进行企业认证");
} }
return Result.of_success("用户未进行企业认证"); return Result.of_error("用户未进行企业认证");
}
/**
* 获取省份
* @return
*/
@Override
public Result getProvince() {
Result result = new Result();
List<Province> list = departmentDao.selectAll();
if (list.size() == 0) {
return Result.error("查询失败!");
}
result.setData(list);
return result;
}
/**
* @param provinceCode
* @param cityCode
* @return
*/
@Override
public Result getCity(String provinceCode,String cityCode) {
List<String> listProviceName= null;
if (StringUtils.isNotBlank(provinceCode) && StringUtils.isNotBlank(cityCode)){
listProviceName= departmentDao.getAreaList(provinceCode,cityCode);
}else if (StringUtils.isNotBlank(provinceCode) && StringUtils.isBlank(cityCode)){
listProviceName = departmentDao.getCityList(provinceCode);
}
/* if (StringUtils.isNotBlank(provinceCode)) {
List<City> list = departmentDao.selectByCity(provinceCode);
if (list.size() == 0) {
return Result.error("查询失败!");
}
result.setData(list);
}*/
return Result.of_success(listProviceName);
} }
/** /**
...@@ -184,33 +236,56 @@ public class CompanyAuthServiceImpl implements CompanyAuthService { ...@@ -184,33 +236,56 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
* *
* @param req * @param req
*/ */
private void insetCompany(CompanyAddReq req) { private Boolean insetCompany(CompanyAddReq req) {
//保存企业信息 //保存企业信息
Department departmentInset = new Department(); Department departmentInset = new Department();
departmentInset.setAuditStatus("01");//待审核 departmentInset.setAuditStatus("01");//待审核
departmentInset.setCreTime(new Date()); departmentInset.setCreTime(new Date());
departmentInset.setCrePerson(req.getLoginName()); departmentInset.setCrePerson(getUser().getCustomerId() + "");
BeanUtils.copyProperties(req, departmentInset); BeanUtils.copyProperties(req, departmentInset);
if (departmentDao.insertDepart(departmentInset) != 1) { if (departmentDao.insertDepart(departmentInset) != 1) {
throw ResponseException.of_error("保存企业信息失败"); throw ResponseException.of_error("保存企业信息失败");
} }
logger.info("###############################企业添加:保存企业信息成功####################################");
// 更新用户信息
if (departmentInset.getDepartmentId() != null) {
MallCustomer mallCustomer = new MallCustomer();
mallCustomer.setCustomerId(getUser().getCustomerId());
mallCustomer.setDepartmentId(departmentInset.getDepartmentId());
mallCustomer.setUptTime(DateUtils.getToday());
mallCustomer.setUptPerson(getUser().getCustomerId() + "");
if (mallCustomerDao.updateById(mallCustomer) != 1) {
throw ResponseException.of_error("更新用户信息失败");
}
logger.info("###############################企业添加:更新用户信息成功####################################");
//初始化用户资产表 //初始化用户资产表
FinanceCustomerAssets finance = new FinanceCustomerAssets(); FinanceCustomerAssets finance = new FinanceCustomerAssets();
finance.setDepartmentId(departmentInset.getDepartmentId());//企业ID finance.setDepartmentId(departmentInset.getDepartmentId());//企业ID
finance.setCreTime(new Date()); finance.setCreTime(new Date());
finance.setCrePerson(req.getLoginName()); finance.setCrePerson(getUser().getCustomerId() + "");
if (financeCustomerAssetsDao.insertFinanceCustome(finance) != 1) { if (financeCustomerAssetsDao.insertFinanceCustome(finance) != 1) {
throw ResponseException.of_error("初始化用户资产失败"); throw ResponseException.of_error("初始化用户资产失败");
} }
//更新用户企业信息 logger.info("###############################企业添加:初始化用户资产成功####################################");
//MallCustomer mallCustomer = new MallCustomer();
//mallCustomer.setCustomerId(req.getLoginId());//用户ID // 添加角色
//mallCustomer.setDepartmentId(departmentInset.getDepartmentId()); if (req.getRoleId() != null) {
//mallCustomer.setUptTime(new Date()); MallUserRole role = new MallUserRole();
//mallCustomer.setUptPerson(req.getLoginName()); role.setCustomerId(getUser().getCustomerId());
//if (mallCustomerDao.updateById(mallCustomer) != 1) { if (2 == req.getRoleId()) {
// throw ResponseException.of_error("更新用户企业信息失败"); role.setRoleId(req.getRoleId());
//} }
if (3 == req.getRoleId()) {
role.setRoleId(req.getRoleId());
}
if (0 == mallCustomerDao.addRole(role)) {
throw ResponseException.of_error("赋予角色失败!");
}
logger.info("###############################企业添加:用户添加角色成功####################################");
}
return true;
}
return false;
} }
/** /**
......
...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.service.impl; ...@@ -3,6 +3,7 @@ package com.jz.dm.mall.moduls.service.impl;
import com.baomidou.mybatisplus.extension.api.R; import com.baomidou.mybatisplus.extension.api.R;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
...@@ -11,6 +12,8 @@ import com.jz.dm.mall.moduls.entity.FinanceCustomerAssets; ...@@ -11,6 +12,8 @@ import com.jz.dm.mall.moduls.entity.FinanceCustomerAssets;
import com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao; import com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao;
import com.jz.dm.mall.moduls.service.FinanceCustomerAssetsService; import com.jz.dm.mall.moduls.service.FinanceCustomerAssetsService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async; import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -28,6 +31,8 @@ import java.util.Date; ...@@ -28,6 +31,8 @@ import java.util.Date;
*/ */
@Service("financeCustomerAssetsService") @Service("financeCustomerAssetsService")
public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsService { public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsService {
private static final Logger logger = LoggerFactory.getLogger(FinanceCustomerAssetsServiceImpl.class);
@Autowired @Autowired
private FinanceCustomerAssetsDao assetsDao; private FinanceCustomerAssetsDao assetsDao;
...@@ -67,7 +72,10 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe ...@@ -67,7 +72,10 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe
assets.setUptTime(DateUtils.getToday()); assets.setUptTime(DateUtils.getToday());
assets.setUptPerson(req.getUserId() + ""); assets.setUptPerson(req.getUserId() + "");
assets.setDelFlag("N"); assets.setDelFlag("N");
assetsDao.updateMoney(assets); if (assetsDao.updateMoney(assets) != 1){
throw ResponseException.of_error("修改金额失败!");
}
logger.info("##########################查询余额:修改冻结金额成功###############################");
return Result.of_success("余额充足!"); return Result.of_success("余额充足!");
} }
return Result.of_error("查询失败!"); return Result.of_error("查询失败!");
...@@ -121,7 +129,11 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe ...@@ -121,7 +129,11 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe
assets.setUptPerson(req.getUserId() + ""); assets.setUptPerson(req.getUserId() + "");
assets.setUptTime(DateUtils.getToday()); assets.setUptTime(DateUtils.getToday());
assets.setDelFlag("N"); assets.setDelFlag("N");
assetsDao.updateMoney(assets); if (assetsDao.updateMoney(assets) != 1) {
throw ResponseException.of_error("修改金额失败!");
}
logger.info("##########################解冻金额:修改金额成功!###############################");
return result; return result;
} }
......
...@@ -8,6 +8,7 @@ import com.jz.common.bean.PageInfoResponse; ...@@ -8,6 +8,7 @@ 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.enums.AuditStatusEnum; import com.jz.common.enums.AuditStatusEnum;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.CommonsUtil; import com.jz.common.utils.CommonsUtil;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
...@@ -19,10 +20,13 @@ import com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao; ...@@ -19,10 +20,13 @@ import com.jz.dm.mall.moduls.mapper.FinanceCustomerAssetsDao;
import com.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao; import com.jz.dm.mall.moduls.mapper.FinanceTradeFlowDao;
import com.jz.dm.mall.moduls.service.FinanceTradeFlowService; import com.jz.dm.mall.moduls.service.FinanceTradeFlowService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
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.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
...@@ -42,6 +46,7 @@ import java.util.concurrent.TimeUnit; ...@@ -42,6 +46,7 @@ import java.util.concurrent.TimeUnit;
@Service("financeTradeFlowService") @Service("financeTradeFlowService")
@Transactional @Transactional
public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
private static final Logger logger = LoggerFactory.getLogger(FinanceTradeFlowServiceImpl.class);
@Autowired @Autowired
private FinanceTradeFlowDao financeTradeFlowDao; private FinanceTradeFlowDao financeTradeFlowDao;
...@@ -58,7 +63,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -58,7 +63,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public Boolean uptAccountMoney(FinanceCustomerBalanceRequest customerBalanceRequest) throws Exception { public Boolean uptAccountMoney(FinanceCustomerBalanceRequest customerBalanceRequest) throws Exception {
if (customerBalanceRequest.getAssetsId() != null && StringUtils.isNotEmpty(customerBalanceRequest.getBalanceMoney().toString())) { if (customerBalanceRequest.getAssetsId() != null && StringUtils.isNotEmpty(customerBalanceRequest.getBalanceMoney().toString())) {
// 商城企业客户资产表 冻结金额 // 商城企业客户资产表 冻结金额
...@@ -70,13 +75,17 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -70,13 +75,17 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
assets.setFrozenMoney(add); assets.setFrozenMoney(add);
assets.setUptPerson(getUser().getCustomerId() + ""); assets.setUptPerson(getUser().getCustomerId() + "");
assets.setUptTime(DateUtils.getToday()); assets.setUptTime(DateUtils.getToday());
financeCustomerAssetsDao.updateMoney(assets); if (financeCustomerAssetsDao.updateMoney(assets) != 1) {
throw ResponseException.of_error("冻结金额添加失败!");
}
logger.info("#########################充值金额:冻结金额添加成功!################################");
} }
//1.充值记录表中加数据 //1.充值记录表中加数据
FinanceCustomerBalance financeCustomerBalance = new FinanceCustomerBalance(); FinanceCustomerBalance financeCustomerBalance = new FinanceCustomerBalance();
financeCustomerBalance.setAssetsId(customerBalanceRequest.getAssetsId());//企业资产id financeCustomerBalance.setAssetsId(customerBalanceRequest.getAssetsId());//企业资产id
financeCustomerBalance.setBalanceMoney(customerBalanceRequest.getBalanceMoney()); //充值金额 financeCustomerBalance.setBalanceMoney(customerBalanceRequest.getBalanceMoney()); //充值金额
financeCustomerBalance.setCrePerson(getUser().getCustomerId()+ ""); financeCustomerBalance.setCrePerson(getUser().getCustomerId()+ "");
financeCustomerBalance.setBalanceTime(DateUtils.getToday());
financeCustomerBalance.setCreTime(new Date()); financeCustomerBalance.setCreTime(new Date());
financeCustomerBalance.setAuditStatus("01"); //待审核 financeCustomerBalance.setAuditStatus("01"); //待审核
financeCustomerBalance.setRemark(customerBalanceRequest.getRemark()); //备注 financeCustomerBalance.setRemark(customerBalanceRequest.getRemark()); //备注
...@@ -85,7 +94,6 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -85,7 +94,6 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
return len > 0; return len > 0;
} }
return false; return false;
} }
@Override @Override
...@@ -104,10 +112,10 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -104,10 +112,10 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
} }
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public Result<Object> addCashOutMoney(FinanceCashOutRequest financeCashOutRequest) throws Exception { public Result<Object> addCashOutMoney(FinanceCashOutRequest financeCashOutRequest) throws Exception {
Result<Object> result = new Result<>(); Result<Object> result = new Result<>();
Long assetId = financeCashOutRequest.getAssetsId(); // 企业资产id Long assetsId = financeCashOutRequest.getAssetsId(); // 企业资产id
BigDecimal cashOutMoney = new BigDecimal(financeCashOutRequest.getCashOutMoney().toString()); //提现金额 BigDecimal cashOutMoney = new BigDecimal(financeCashOutRequest.getCashOutMoney().toString()); //提现金额
FinanceCashOut financeCashOut = new FinanceCashOut(); FinanceCashOut financeCashOut = new FinanceCashOut();
...@@ -127,7 +135,8 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -127,7 +135,8 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
} }
// 查询 当前企业 可用余额 冻结金额 // 查询 当前企业 可用余额 冻结金额
Map map = new HashMap(); Map map = new HashMap();
map.put("assetId", assetId); map.put("assetsId", assetsId);
FinanceCustomerAssetsDto dto = financeTradeFlowDao.queryAccountMoneyByMap(map); FinanceCustomerAssetsDto dto = financeTradeFlowDao.queryAccountMoneyByMap(map);
BigDecimal useMoney = new BigDecimal(dto.getUseMoney().toString()); //可用金额 BigDecimal useMoney = new BigDecimal(dto.getUseMoney().toString()); //可用金额
if (useMoney != null && cashOutMoney != null) { if (useMoney != null && cashOutMoney != null) {
...@@ -145,7 +154,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService { ...@@ -145,7 +154,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
assets.setUseMoney(useMoney); assets.setUseMoney(useMoney);
assets.setFrozenMoney(djMoney); assets.setFrozenMoney(djMoney);
assets.setTotalMoney(useMoney); assets.setTotalMoney(useMoney);
assets.setAssetsId(assetId); assets.setAssetsId(assetsId);
int lens = financeCustomerAssetsDao.uptAccountMoney(assets); int lens = financeCustomerAssetsDao.uptAccountMoney(assets);
if (lens == 0) { if (lens == 0) {
result.setMessage("提交失败!"); result.setMessage("提交失败!");
......
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
import com.jz.common.base.CurrentUser;
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;
...@@ -9,19 +10,27 @@ import com.jz.common.enums.UserTypeEnum; ...@@ -9,19 +10,27 @@ import com.jz.common.enums.UserTypeEnum;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.common.utils.SessionUtils;
import com.jz.dm.mall.moduls.controller.customer.bean.CustomerDto; import com.jz.dm.mall.moduls.controller.customer.bean.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.LoginRequest;
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.mapper.MallCustomerDao; import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
import com.jz.dm.mall.moduls.service.MallCustomerService; import com.jz.dm.mall.moduls.service.MallCustomerService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List; import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit; import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors; import java.util.stream.Collectors;
...@@ -49,24 +58,6 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -49,24 +58,6 @@ public class MallCustomerServiceImpl implements MallCustomerService {
@Override @Override
public CustomerDto selectByAccount(String username, HttpServletRequest request) { public CustomerDto selectByAccount(String username, HttpServletRequest request) {
CustomerDto mallCustomer = tMallCustomerDao.selectByAccount(username); CustomerDto mallCustomer = tMallCustomerDao.selectByAccount(username);
// String customer = JSON.toJSONString(mallCustomer);
if (mallCustomer != null) {
MallCustomerApiDto mallCustomerApiDto = new MallCustomerApiDto();
// 赋值
mallCustomerApiDto.setCustomerId(mallCustomer.getCustomerId());
mallCustomerApiDto.setDepartmentId(mallCustomer.getDepartmentId());
mallCustomerApiDto.setUserTypeEnum(UserTypeEnum.COMPANY_ROLE);
mallCustomerApiDto.setCustomerAccount(mallCustomer.getCustomerAccount());
mallCustomerApiDto.setCustomerName(mallCustomer.getCustomerName());
mallCustomerApiDto.setAssetsId(mallCustomer.getAssetsId());
// 存入到session
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
return mallCustomer; return mallCustomer;
} }
...@@ -79,21 +70,6 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -79,21 +70,6 @@ public class MallCustomerServiceImpl implements MallCustomerService {
@Override @Override
public CustomerDto selectByPhone(String username, HttpServletRequest request) { public CustomerDto selectByPhone(String username, HttpServletRequest request) {
CustomerDto mallCustomer = tMallCustomerDao.selectByPhone(username); CustomerDto mallCustomer = tMallCustomerDao.selectByPhone(username);
if (mallCustomer != null) {
MallCustomerApiDto mallCustomerApiDto = new MallCustomerApiDto();
// 赋值
mallCustomerApiDto.setCustomerId(mallCustomer.getCustomerId());
mallCustomerApiDto.setDepartmentId(mallCustomer.getDepartmentId());
mallCustomerApiDto.setUserTypeEnum(UserTypeEnum.COMPANY_ROLE);
mallCustomerApiDto.setCustomerAccount(mallCustomer.getCustomerAccount());
mallCustomerApiDto.setCustomerName(mallCustomer.getCustomerName());
mallCustomerApiDto.setAssetsId(mallCustomer.getAssetsId());
// 存入到session
request.getSession().setAttribute("mallCustomer", mallCustomerApiDto);
// 存入到redis
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
return mallCustomer; return mallCustomer;
} }
...@@ -103,26 +79,47 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -103,26 +79,47 @@ public class MallCustomerServiceImpl implements MallCustomerService {
* @param * @param
*/ */
@Override @Override
public void saveCustomer(CustomerRequest customerRequest) { public Result saveCustomer(CustomerRequest customerRequest) {
MallCustomer mallCustomer = new MallCustomer();
// 获取验证码 // 获取验证码
String vailCode = customerRequest.getVailCode(); String vailCode = customerRequest.getVailCode();
String username = customerRequest.getUsername();
String telephone = customerRequest.getTelephone(); String telephone = customerRequest.getTelephone();
String username = customerRequest.getUsername();
Map mapUser = new HashMap();
if (StringUtils.isNotEmpty(customerRequest.getUsername())) {
mapUser.put("customerAccount",customerRequest.getUsername());
}
MallCustomerApiDto customerUser = tMallCustomerDao.selectByUser(mapUser);
if (customerUser != null) {
return Result.of_error("用户已注册!");
}
Map mapPhone = new HashMap();
if (StringUtils.isNotEmpty(customerRequest.getTelephone())) {
mapPhone.put("customerPhone",customerRequest.getTelephone());
}
MallCustomerApiDto customerPhone = tMallCustomerDao.selectByUser(mapPhone);
if (customerPhone != null) {
return Result.of_error("手机号已注册!");
}
// 从redis获取验证码 // 从redis获取验证码
String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone; String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
// String key = "18179617425"; Integer codeInRedis = (Integer) redisTemplate.opsForValue().get(key);
String codeInRedis = (String) redisTemplate.opsForValue().get(key); if (codeInRedis == null) {
// String codeInRedis = "147826"; return Result.of_error("验证码为空!");
if (codeInRedis.equals(vailCode)) {
mallCustomer.setCustomerAccount(username);
mallCustomer.setPassword(customerRequest.getPassword());
mallCustomer.setCustomerPhone(telephone);
mallCustomer.setCreTime(DateUtils.getToday());
mallCustomer.setRegisterTime(DateUtils.getToday());
tMallCustomerDao.saveCustomer(mallCustomer);
} }
String s = codeInRedis.toString();
if (s.equals(vailCode)) {
MallCustomer customer = new MallCustomer();
customer.setCustomerAccount(username);
customer.setPassword(customerRequest.getPassword());
customer.setCustomerPhone(telephone);
customer.setCreTime(DateUtils.getToday());
customer.setRegisterTime(DateUtils.getToday());
tMallCustomerDao.saveCustomer(customer);
return Result.of_success("注册成功!");
}
return Result.of_error("注册失败!");
} }
/** /**
...@@ -171,7 +168,7 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -171,7 +168,7 @@ public class MallCustomerServiceImpl implements MallCustomerService {
} }
/** /**
* 根据用户id,角色id查找菜单 * 根据用户id,角色id查找菜单
* *
* @param userId * @param userId
* @param roleId * @param roleId
...@@ -193,6 +190,57 @@ public class MallCustomerServiceImpl implements MallCustomerService { ...@@ -193,6 +190,57 @@ public class MallCustomerServiceImpl implements MallCustomerService {
return Result.of_success(ResultMsg.SUCCESS, level1Menus); return Result.of_success(ResultMsg.SUCCESS, level1Menus);
} }
/**
* 登陆
* @param customer
* @return
*/
@Override
public Result loginByUser(LoginRequest customer) {
// 手机登陆
String ph = "^[1][34578]\\d{9}$";
Map map = new HashMap();
if (customer.getUsername().matches(ph) && StringUtils.isNotEmpty(customer.getUsername())) {
map = new HashMap();
map.put("customerPhone", customer.getUsername());
MallCustomerApiDto mallCustomer = tMallCustomerDao.selectByUser(map);
if (mallCustomer.getCustomerId() == null) {
return Result.of_error("用户不存在,请注册!");
}
if (mallCustomer.getPassword().equals(customer.getPassword())) {
// 查询当前用户有无角色
if (StringUtils.isNotBlank(mallCustomer.getRoleId())) {
MallCustomerApiDto mallCustomerApiDto = new MallCustomerApiDto();
BeanUtils.copyProperties(mallCustomer,mallCustomerApiDto);
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomer, 3, TimeUnit.DAYS);
return Result.of_success(ResultMsg.LOGIN_SUCCESS, mallCustomer);
}
return Result.of_error(ResultMsg.LOGIN_ERROR);
}
map = new HashMap();
map.put("customerAccount",customer.getUsername());
MallCustomerApiDto mallCustomer = tMallCustomerDao.selectByUser(map);
if (mallCustomer == null) {
return Result.of_error("用户不存在,请注册!");
}
if (mallCustomer.getPassword().equals(customer.getPassword())) {
// 查询当前用户有无角色
if (StringUtils.isNotBlank(mallCustomer.getRoleId())) {
MallCustomerApiDto mallCustomerApiDto = new MallCustomerApiDto();
BeanUtils.copyProperties(mallCustomer,mallCustomerApiDto);
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomerApiDto, 3, TimeUnit.DAYS);
}
redisTemplate.opsForValue().set("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER, mallCustomer, 3, TimeUnit.DAYS);
return Result.of_success(ResultMsg.LOGIN_SUCCESS, mallCustomer);
}
return Result.of_error(ResultMsg.LOGIN_ERROR);
}
private List<MallMenu> getChildrens(MallMenu sysMenu,List<MallMenu> all) { private List<MallMenu> getChildrens(MallMenu sysMenu,List<MallMenu> all) {
List<MallMenu> children = all.stream().filter(sysMenuEntity -> { List<MallMenu> children = all.stream().filter(sysMenuEntity -> {
......
package com.jz.dm.mall.moduls.service.impl; package com.jz.dm.mall.moduls.service.impl;
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.MallCustomerApiDto; import com.jz.common.bean.MallCustomerApiDto;
...@@ -12,11 +15,15 @@ import com.jz.common.constant.ResultMsg; ...@@ -12,11 +15,15 @@ import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.DateUtils; import com.jz.common.utils.DateUtils;
import com.jz.common.utils.HttpsUtilsTest; import com.jz.common.utils.HttpsUtilsTest;
import com.jz.common.utils.Result; import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.controller.customer.bean.req.PurchaserUserCenterReq;
import com.jz.dm.mall.moduls.controller.order.bean.*; import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.entity.Order; import com.jz.dm.mall.moduls.entity.Order;
import com.jz.dm.mall.moduls.mapper.DepartmentDao;
import com.jz.dm.mall.moduls.mapper.OrderDao; import com.jz.dm.mall.moduls.mapper.OrderDao;
import com.jz.dm.mall.moduls.service.OrderService; import com.jz.dm.mall.moduls.service.OrderService;
import org.apache.commons.lang3.StringUtils; import org.apache.commons.lang3.StringUtils;
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.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.RedisTemplate;
...@@ -24,6 +31,8 @@ import org.springframework.stereotype.Service; ...@@ -24,6 +31,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional; import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat; import java.text.SimpleDateFormat;
import java.util.*; import java.util.*;
...@@ -43,6 +52,9 @@ public class OrderServiceImpl implements OrderService { ...@@ -43,6 +52,9 @@ public class OrderServiceImpl implements OrderService {
//@Autowired //@Autowired
//private HttpsUtils httpsUtils; //private HttpsUtils httpsUtils;
@Autowired
private DepartmentDao departmentDao;
@Autowired @Autowired
private RedisTemplate redisTemplate; private RedisTemplate redisTemplate;
...@@ -131,7 +143,8 @@ public class OrderServiceImpl implements OrderService { ...@@ -131,7 +143,8 @@ public class OrderServiceImpl implements OrderService {
//调用gatway //调用gatway
JSONObject object = new JSONObject(); JSONObject object = new JSONObject();
object.put("id",req.getId()); object.put("authCode", req.getGoodsToken());
object.put("createUser", customer.getCustomerName());
String s = HttpsUtilsTest.submitPost(gatewayUpSalt, object.toString()); String s = HttpsUtilsTest.submitPost(gatewayUpSalt, object.toString());
//处理返回的参数 //处理返回的参数
JSONObject params = JSONObject.parseObject(s); JSONObject params = JSONObject.parseObject(s);
...@@ -148,8 +161,118 @@ public class OrderServiceImpl implements OrderService { ...@@ -148,8 +161,118 @@ public class OrderServiceImpl implements OrderService {
order.setUptTime(DateUtils.getToday()); order.setUptTime(DateUtils.getToday());
order.setUptPerson(customer.getCustomerId() + ""); order.setUptPerson(customer.getCustomerId() + "");
orderDao.updateSalt(order); orderDao.updateSalt(order);
return Result.of_success(ResultMsg.SUCCESS, ResultCode.SUCCESS); Map map = new HashMap();
map.put("salt", salt);
return Result.of_success(ResultMsg.SUCCESS, salt);
}
@Override
public Result<IPage<OrderBySellerDto>> queryPageListBySeller(OrderRequest req, HttpServletRequest httpServletRequest) {
IPage<OrderBySellerDto> page = new Page<>(req.getPageNum(), req.getPageSize());
QueryWrapper<OrderBySellerDto> query = new QueryWrapper<>();
if (StringUtils.isNotBlank(req.getSearch())) {
query.and(wrapper -> wrapper.like("t2.data_name", req.getSearch())
.or().like("t4.department_name", req.getSearch()));
}
if (StringUtils.isNotBlank(req.getPurchaseMethod())) {
query.eq("t.purchaseMethod", req.getPurchaseMethod());
}
if (StringUtils.isNotBlank(req.getOrderTime())) {
String startTime = req.getOrderTime().substring(0, 10) + " 00:00:00";
String endTime = req.getOrderTime().substring(11, 21) + " 23:59:59";
query.between("t.order_time", startTime, endTime);
}
query.eq("t.del_flag", "N");
query.orderByDesc("t.order_time");
IPage<OrderBySellerDto> list = orderDao.queryPageListBySeller(page, query);
if (list.getTotal() == 0) {
return Result.of_error("没有订单!");
}
return Result.of_success(list);
}
/**
* 用户中心-获取当前用户的成交单数
*
* @param
* @return
*/
@Override
public Result<PurchaserUserCenterDto> userCenter(PurchaserUserCenterReq req) {
PurchaserUserCenterDto dto = null;
MallCustomerApiDto customer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
Map map = new HashMap();
if (StringUtils.isNotBlank(req.getDay())) {
map.put("day", req.getDay());
}
if (StringUtils.isNotBlank(req.getWeeks())) {
map.put("weeks",req.getWeeks());
}
if (StringUtils.isNotBlank(req.getMonth())) {
map.put("year", req.getMonth());
}
map.put("customerId", customer.getCustomerId());
PurchaserUserCenterDto dtox = orderDao.getMoneyAndOrderTotalDto(map);
if (dtox.getOrderTotal() == null) {
return Result.of_error("查询失败!");
} }
String orderTotal = dtox.getOrderTotal();
BigDecimal transactionMoney = dtox.getTransactionMoney();
BigDecimal divide = transactionMoney.divide(new BigDecimal(orderTotal), 2, BigDecimal.ROUND_DOWN);
dto = departmentDao.selectByBasic(customer.getCustomerId());
dto.setUseMoney(new BigDecimal(dto.getUseMoney()).setScale(2,BigDecimal.ROUND_DOWN).toString());
dto.setOrderTotal(dtox.getOrderTotal());
dto.setTransactionMoney(dtox.getTransactionMoney());
dto.setMeanTransactionMoney(divide.toString());
return Result.of_success(dto);
}
@Override
public PageInfoResponse<OrderByPurchaserDto> queryPageListByPurchaser(OrderRequest req) {
PageInfoResponse<OrderByPurchaserDto> pageInfoResponse = new PageInfoResponse<>();
Map<String, Object> param = new HashMap<>();
if (StringUtils.isNotBlank(req.getDataName())) {
param.put("dataName", req.getDataName());
}
if (StringUtils.isNotBlank(req.getPriceType())) {
param.put("priceType", req.getPriceType());
}
List<String> apiKey = orderDao.getApiKey(getCustomer().getCustomerId());
if (apiKey.size() != 0) {
param.put("apiKeys", apiKey);
}
param.put("dateNow",DateUtils.getToday());
PageHelper.startPage(req.getPageNum(), req.getPageSize());
List<OrderByPurchaserDto> list = orderDao.queryPageListByPurchaser(param);
PageInfo<OrderByPurchaserDto> pageInfo = new PageInfo<>(list);
pageInfoResponse.setCode(Constants.SUCCESS_CODE);
pageInfoResponse.setMessage("查询成功");
pageInfoResponse.setData(pageInfo);
return pageInfoResponse;
}
@Override
public Result getApiKey() {
MallCustomerApiDto customer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
List<String> apiKey = orderDao.getApiKey(customer.getCustomerId());
if (apiKey.size() == 0) {
return Result.of_error("apiKey为空!");
}
return Result.of_success(apiKey);
}
public MallCustomerApiDto getCustomer() {
MallCustomerApiDto customer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
return customer;
}
} }
\ No newline at end of file
...@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject; ...@@ -7,6 +7,7 @@ import com.alibaba.fastjson.JSONObject;
import com.jz.common.constant.ResultMsg; import com.jz.common.constant.ResultMsg;
import com.jz.common.enums.auth.AuthModeEnum; import com.jz.common.enums.auth.AuthModeEnum;
import com.jz.common.enums.auth.AuthTypeEnum; import com.jz.common.enums.auth.AuthTypeEnum;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.*; import com.jz.common.utils.*;
import com.jz.dm.mall.moduls.controller.pay.dto.PayDto; import com.jz.dm.mall.moduls.controller.pay.dto.PayDto;
import com.jz.dm.mall.moduls.controller.pay.req.AuthMallUserApiReq; import com.jz.dm.mall.moduls.controller.pay.req.AuthMallUserApiReq;
...@@ -16,6 +17,8 @@ import com.jz.dm.mall.moduls.mapper.*; ...@@ -16,6 +17,8 @@ import com.jz.dm.mall.moduls.mapper.*;
import com.jz.dm.mall.moduls.service.PayService; import com.jz.dm.mall.moduls.service.PayService;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value; import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service; import org.springframework.stereotype.Service;
...@@ -37,7 +40,7 @@ import java.util.Date; ...@@ -37,7 +40,7 @@ import java.util.Date;
*/ */
@Service("payService") @Service("payService")
public class PayServiceImpl implements PayService { public class PayServiceImpl implements PayService {
private static final Logger logger = LoggerFactory.getLogger(PayServiceImpl.class);
@Autowired @Autowired
private OrderDao orderDao; private OrderDao orderDao;
...@@ -155,7 +158,7 @@ public class PayServiceImpl implements PayService { ...@@ -155,7 +158,7 @@ public class PayServiceImpl implements PayService {
System.out.println(post); System.out.println(post);
JSONObject params = JSONObject.parseObject(post); JSONObject params = JSONObject.parseObject(post);
if (!params.get("code").equals(200) || StringUtils.isEmpty(params.get("data"))){ if (!params.get("code").equals(200) || StringUtils.isEmpty(params.get("data"))){
return Result.of_error("授权失败!"); throw ResponseException.of_error("授权失败!");
} }
assets.setUseMoney(subtract); assets.setUseMoney(subtract);
assets.setTotalMoney(subtract); assets.setTotalMoney(subtract);
......
...@@ -37,7 +37,12 @@ spring: ...@@ -37,7 +37,12 @@ spring:
#oracle设为true,mysql设为false。分库分表较多推荐设置为false #oracle设为true,mysql设为false。分库分表较多推荐设置为false
poolPreparedStatements: false poolPreparedStatements: false
maxPoolPreparedStatementPerConnectionSize: 20 maxPoolPreparedStatementPerConnectionSize: 20
rabbitmq:
host: localhost
port: 5672
virtual-host: testhost
username: admin
password: admin
cache: cache:
type: CAFFEINE type: CAFFEINE
caffeine: caffeine:
...@@ -72,10 +77,22 @@ logging: ...@@ -72,10 +77,22 @@ logging:
domain: domain:
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://47.115.53.1:8088/api/auth/reset-salt gatewayUpSalt: http://192.168.1.114:8088/api/auth/reset-salt
apigateway: http://127.0.0.1:8088/api/producer/addDataBankApiInfo
ftp: ftp:
url: 192.168.1.141 url: 192.168.1.141
port: 21 port: 21
username: ftpuser username: ftpuser
password: 9zDatacn password: 9zDatacn
token: #dataBank 制作验签
dataBank: dataBank123
mq:
pay:
exchange:
order: exchange.order
queue:
order: queue.order
routing:
key: queue.order
\ No newline at end of file
...@@ -43,13 +43,13 @@ ...@@ -43,13 +43,13 @@
bank_no AS bankNo,audit_status AS auditStatus,audit_status AS auditStatus,audit_person AS auditPerson,cre_time AS creTime, bank_no AS bankNo,audit_status AS auditStatus,audit_status AS auditStatus,audit_person AS auditPerson,cre_time AS creTime,
cre_person AS crePerson,del_flag AS delFlag cre_person AS crePerson,del_flag AS delFlag
</sql> </sql>
<insert id="insertDepart"> <insert id="insertDepart" keyProperty="departmentId" useGeneratedKeys="true">
INSERT INTO t_department( INSERT INTO t_department(
`department_name`,`province`,`city`,`linkman`,`telephone`,`registered_address`,`business_license`, `department_name`,`province`,`city`,`linkman`,`telephone`,`registered_address`,`business_license`,
`tax_registration`, `depart_picture_time`,`business_license_time`,`unified_credit_code`, `bank_name`, `tax_registration`, `depart_picture_time`,`business_license_time`,`unified_credit_code`, `bank_name`,
`bank_card_number`,`audit_status`,`cre_time`, `cre_person`) VALUES `bank_card_number`,`audit_status`,`cre_time`, `cre_person`) VALUES
(#{dep.departmentName},#{dep.province},#{dep.city},#{linkman},#{dep.telephone},#{registeredAddress}, (#{dep.departmentName},#{dep.province},#{dep.city},#{dep.linkman},#{dep.telephone},#{dep.registeredAddress},
#{dep.businessLicense},#{dep.unifiedCreditCode},#{bankName},#{bankCardNumber},#{auditStatus},NOW(),#{crePerson}) #{dep.businessLicense},#{dep.taxRegistration},#{dep.departPictureTime},#{dep.businessLicenseTime},#{dep.unifiedCreditCode},#{dep.bankName},#{dep.bankCardNumber},#{dep.auditStatus},#{dep.creTime},#{dep.crePerson})
</insert> </insert>
<select id="selectDepartmentData" resultType="com.jz.common.entity.Department" parameterType="com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq"> <select id="selectDepartmentData" resultType="com.jz.common.entity.Department" parameterType="com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq">
...@@ -67,17 +67,84 @@ ...@@ -67,17 +67,84 @@
</select> </select>
<select id="selectCompanyDetail" resultType="com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto"> <select id="selectCompanyDetail" resultType="com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto">
SELECT SELECT
department_id AS departmentId, t1.department_id AS departmentId,
audit_status AS auditStatus, t1.audit_status AS auditStatus,
department_name AS departmentName, t1.department_name AS departmentName,
registered_address AS registeredAddress, t1.registered_address AS registeredAddress,
business_license AS businessLicense, t1.business_license AS businessLicense,
bank_name AS bankName, t1.bank_name AS bankName,
brank_card_number AS bankCardNumber, t1.bank_card_number AS bankCardNumber,
linkman AS linkman, t1.linkman AS linkman,
telephone AS telephone t1.telephone AS telephone,
FROM t_department t4.role_id as roleId
WHERE department_id=#{departmentId} AND del_flag ='N' FROM t_department t1
INNER JOIN t_mall_customer t2 ON t1.department_id = t2.department_id
inner join t_mall_user_role t3 on t2.customer_id = t3.customer_id
INNER JOIN t_mall_role t4 on t3.role_id = t4.role_id
WHERE t1.department_id=#{departmentId} AND t1.del_flag ='N'
</select> </select>
<select id="selectAll" resultType="com.jz.dm.mall.moduls.entity.Province" parameterType="list">
SELECT
id,
name,
province_code
FROM
t_province
</select>
<select id="selectByCity" resultType="com.jz.dm.mall.moduls.entity.City" parameterType="list">
SELECT
id,
name,
city_code
FROM
t_city
WHERE
province_code = #{provinceCode}
</select>
<select id="getAreaList" resultType="java.lang.String">
SELECT
DISTINCT( a.`name` ) AS `name`
FROM t_province AS p
JOIN t_city AS c ON c.province_code = p.province_code
JOIN t_area AS a ON a.city_code = c.city_code
WHERE
<if test="provinceCode !=null and provinceCode != ''">
p.province_code = #{provinceCode}
</if>
<if test="cityCode !=null and cityCode != ''">
AND c.city_code =#{cityCode}
</if>
</select>
<select id="getCityList" resultType="java.lang.String">
SELECT
DISTINCT( c.`name` ) AS `name`
FROM t_province AS p
JOIN t_city AS c ON c.province_code = p.province_code
JOIN t_area AS a ON a.city_code = c.city_code
WHERE
<if test="provinceCode !=null and provinceCode != ''">
p.province_code = #{provinceCode}
</if>
</select>
<select id="selectByBasic" resultType="com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto">
SELECT
t1.department_name as departmentName,
t1.registered_address as registeredAddress,
t1.cre_time as creTime,
t2.use_money as useMoney
FROM
t_department t1
join t_finance_customer_assets t2 on t1.department_id = t2.department_id
join t_mall_customer t3 on t1.department_id = t3.department_id
where
t1.del_flag = 'N' and
t1.audit_status = '02' and
t3.customer_id = #{customerId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -256,4 +256,54 @@ ...@@ -256,4 +256,54 @@
inner join t_mall_menu e on e.menu_id=d.menu_id inner join t_mall_menu e on e.menu_id=d.menu_id
where a.customer_id=#{userId} and c.role_id = #{roleId} where a.customer_id=#{userId} and c.role_id = #{roleId}
</select> </select>
<!--添加角色权限-->
<insert id="addRole" keyProperty="customerRoleId" useGeneratedKeys="true">
insert into t_mall_user_role(customer_id, role_id)
values (#{customerId},#{roleId})
</insert>
<!--查询当前用户身份-->
<select id="findByRoleId" resultType="com.jz.dm.mall.moduls.entity.MallUserRole">
SELECT
GROUP_CONCAT(t3.role_id) AS roleId,
t3.role_name as roleName
FROM
t_mall_customer t1
INNER JOIN t_mall_user_role t2 ON t1.customer_id = t2.customer_id
INNER JOIN t_mall_role t3 ON t2.role_id = t3.role_id
WHERE
t1.customer_id = #{customerId}
and t1.del_flag ='N'
GROUP BY t1.customer_id
</select>
<select id="selectByUser" resultType="com.jz.common.bean.MallCustomerApiDto" parameterType="map">
SELECT
t1.customer_id AS customerId,
t1.department_id AS departmentId,
t1.PASSWORD,
t1.customer_account AS customerAccount,
t1.customer_name AS customerName,
t1.customer_phone AS customerPhone,
t1.head_portrait_url AS headPortraitUrl,
t5.assets_id AS assetsId,
GROUP_CONCAT( t3.role_id ) AS roleId,
t3.role_name AS roleName
FROM
t_mall_customer t1
left JOIN t_mall_user_role t2 ON t1.customer_id = t2.customer_id
left JOIN t_mall_role t3 ON t2.role_id = t3.role_id
left JOIN t_department t4 ON t1.department_id = t4.department_id
left JOIN t_finance_customer_assets t5 ON t5.department_id = t4.department_id
WHERE
t1.del_flag = 'N'
<if test="customerAccount != null">
and t1.customer_account = #{customerAccount}
</if>
<if test="customerPhone != null">
and t1.customer_phone = #{customerPhone}
</if>
GROUP BY t1.customer_id
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -194,7 +194,7 @@ ...@@ -194,7 +194,7 @@
where assets_id = #{assetsId} where assets_id = #{assetsId}
</insert> </insert>
<insert id="updateMoney" parameterType="com.jz.dm.mall.moduls.entity.FinanceCustomerAssets"> <update id="updateMoney" parameterType="com.jz.dm.mall.moduls.entity.FinanceCustomerAssets">
update t_finance_customer_assets update t_finance_customer_assets
<set> <set>
<if test="departmentId != null"> <if test="departmentId != null">
...@@ -220,5 +220,5 @@ ...@@ -220,5 +220,5 @@
</if> </if>
</set> </set>
where assets_id = #{assetsId} where assets_id = #{assetsId}
</insert> </update>
</mapper> </mapper>
\ No newline at end of file
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
where 1=1 and audit_status ='01' and assets_id = #{assetsId} where 1=1 and audit_status ='01' and assets_id = #{assetsId}
</select> </select>
<insert id="addCashOutMoney" keyProperty="customerBalanceId" useGeneratedKeys="true"> <insert id="addCashOutMoney" keyProperty="cashOutId" useGeneratedKeys="true">
insert into t_finance_cash_out(assets_id, cash_out_money, cash_out_time, audit_time, audit_person, insert into t_finance_cash_out(assets_id, cash_out_money, cash_out_time, audit_time, audit_person,
reject_reason, pay_time, pay_person, remark, audit_status, cre_person, cre_time, del_flag) reject_reason, pay_time, pay_person, remark, audit_status, cre_person, cre_time, del_flag)
values (#{assetsId}, #{cashOutMoney}, #{cashOutTime}, #{auditTime}, #{auditPerson}, #{rejectReason}, values (#{assetsId}, #{cashOutMoney}, #{cashOutTime}, #{auditTime}, #{auditPerson}, #{rejectReason},
......
...@@ -258,15 +258,18 @@ ...@@ -258,15 +258,18 @@
<if test="categoryId != null">and t2.category_id = #{categoryId}</if> <if test="categoryId != null">and t2.category_id = #{categoryId}</if>
<if test="orderStatus != null and orderStatus != ''">and t.order_status = #{orderStatus}</if> <if test="orderStatus != null and orderStatus != ''">and t.order_status = #{orderStatus}</if>
<if test="orderTime != null">and t.order_time = #{orderTime}</if> <if test="orderTime != null">and t.order_time = #{orderTime}</if>
order By t.order_time DESC
</select> </select>
<!--根据订单id 查询详情--> <!--根据订单id 查询详情-->
<select id="getOrderDetail" resultType="com.jz.dm.mall.moduls.controller.order.bean.OrderDto" parameterType="map"> <select id="getOrderDetail" resultType="com.jz.dm.mall.moduls.controller.order.bean.OrderDto" parameterType="map">
select select
t.order_id as orderId, t.order_id as orderId,
t.order_number as orderNumber, t.order_number as orderNumber,
(case when t.order_status ='01' then '待支付' when t.order_status ='02' then '已支付' when t.order_status ='03' then '已取消' end) as orderStatus, (case when t.order_status ='01' then '待支付' when t.order_status ='02' then '已支付' when t.order_status ='03' then
'已取消' end) as orderStatus,
t.order_time as orderTime, t.order_time as orderTime,
(case when t.purchase_method ='01' then '年' when t.purchase_method ='02' then '季' when t.purchase_method ='03' then '月' (case when t.purchase_method ='01' then '年' when t.purchase_method ='02' then '季' when t.purchase_method ='03'
then '月'
when t.purchase_method ='04' then '次' end) as purchaseMethod, when t.purchase_method ='04' then '次' end) as purchaseMethod,
(DATE_FORMAT(t.take_effect_time,'%Y-%m-%d %H:%i:%s')) as takeEffectTime, (DATE_FORMAT(t.take_effect_time,'%Y-%m-%d %H:%i:%s')) as takeEffectTime,
(DATE_FORMAT(t.invalid_time,'%Y-%m-%d %H:%i:%s')) as invalidTime, (DATE_FORMAT(t.invalid_time,'%Y-%m-%d %H:%i:%s')) as invalidTime,
...@@ -281,23 +284,23 @@ ...@@ -281,23 +284,23 @@
</select> </select>
<resultMap id="apiParamsInfo" type="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto"> <resultMap id="apiParamsInfo" type="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto">
<id column="goods_api" property="goodsApi" /> <id column="goods_api" property="goodsApi"/>
<result column="api_name" property="apiName" /> <result column="api_name" property="apiName"/>
<result column="request_type" property="requestType" /> <result column="request_type" property="requestType"/>
<result column="api_url" property="apiUrl" /> <result column="api_url" property="apiUrl"/>
<result column="api_method" property="apiMethod" /> <result column="api_method" property="apiMethod"/>
<result column="api_protocl" property="apiProtocl" /> <result column="api_protocl" property="apiProtocl"/>
<result column="return_data_example" property="returnDataExample" /> <result column="return_data_example" property="returnDataExample"/>
<result column="return_type" property="returnType" /> <result column="return_type" property="returnType"/>
<result column="api_key" property="apiKey" /> <result column="api_key" property="apiKey"/>
<result column="request_token" property="requestToken" /> <result column="request_token" property="requestToken"/>
<collection property="apiParamsDto" ofType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto"> <collection property="apiParamsDto" ofType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto">
<id column="api_params_id" property="apiParamsId" /> <id column="api_params_id" property="apiParamsId"/>
<result column="params_diff" property="paramsDiff" /> <result column="params_diff" property="paramsDiff"/>
<result column="params_name" property="paramsName" /> <result column="params_name" property="paramsName"/>
<result column="params_type" property="paramsType" /> <result column="params_type" property="paramsType"/>
<result column="params_desc" property="paramsDesc" /> <result column="params_desc" property="paramsDesc"/>
<result column="if_requird" property="ifRequird" /> <result column="if_requird" property="ifRequird"/>
</collection> </collection>
</resultMap> </resultMap>
...@@ -325,14 +328,16 @@ ...@@ -325,14 +328,16 @@
t4.api_params_id as apiParamsId t4.api_params_id as apiParamsId
from t_order t from t_order t
inner join t_order_goods_info t1 on t.order_id=t1.order_id inner join t_order_goods_info t1 on t.order_id=t1.order_id
inner join t_data_goods t2 on t2.data_goods_id=t1.data_goods_id <if test="dataGoodsId != null">and t2.data_goods_id = #{dataGoodsId}</if> inner join t_data_goods t2 on t2.data_goods_id=t1.data_goods_id
<if test="dataGoodsId != null">and t2.data_goods_id = #{dataGoodsId}</if>
inner join t_data_goods_api t3 on t3.data_goods_id=t2.data_goods_id inner join t_data_goods_api t3 on t3.data_goods_id=t2.data_goods_id
left join t_data_goods_api_params t4 on t4.goods_api=t3.goods_api left join t_data_goods_api_params t4 on t4.goods_api=t3.goods_api
where 1=1 and t.order_status='02' where 1=1 and t.order_status='02'
<if test="orderId != null">and t.order_id = #{orderId}</if> <if test="orderId != null">and t.order_id = #{orderId}</if>
</select> </select>
<select id="getApiInterface" resultType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto" parameterType="map"> <select id="getApiInterface" resultType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto"
parameterType="map">
select select
t3.goods_api as goodsApi, t3.goods_api as goodsApi,
t3.api_name as apiName, t3.api_name as apiName,
...@@ -347,13 +352,15 @@ ...@@ -347,13 +352,15 @@
t.goods_token as goodsToken t.goods_token as goodsToken
from t_order t from t_order t
inner join t_order_goods_info t1 on t.order_id=t1.order_id inner join t_order_goods_info t1 on t.order_id=t1.order_id
inner join t_data_goods t2 on t2.data_goods_id=t1.data_goods_id <if test="dataGoodsId != null">and t2.data_goods_id = #{dataGoodsId}</if> inner join t_data_goods t2 on t2.data_goods_id=t1.data_goods_id
<if test="dataGoodsId != null">and t2.data_goods_id = #{dataGoodsId}</if>
inner join t_data_goods_api t3 on t3.data_goods_id=t2.data_goods_id inner join t_data_goods_api t3 on t3.data_goods_id=t2.data_goods_id
where 1=1 and t.order_status='02' where 1=1 and t.order_status='02'
<if test="orderId != null">and t.order_id = #{orderId}</if> <if test="orderId != null">and t.order_id = #{orderId}</if>
</select> </select>
<select id="getApiParamsInfo" resultType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto" parameterType="map"> <select id="getApiParamsInfo" resultType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto"
parameterType="map">
select select
(case when t4.params_diff ='01' then '公共参数' when t4.params_diff ='02' then '请求参数' (case when t4.params_diff ='01' then '公共参数' when t4.params_diff ='02' then '请求参数'
when t4.params_diff ='03' then '响应参数' when t4.params_diff ='03' then '响应参数'
...@@ -427,4 +434,97 @@ ...@@ -427,4 +434,97 @@
</set> </set>
where order_id = #{orderId} where order_id = #{orderId}
</update> </update>
<select id="queryPageListBySeller" resultType="com.jz.dm.mall.moduls.controller.order.bean.OrderBySellerDto">
SELECT
t.order_id AS orderId,
t.order_number AS orderNumber,
(CASE
WHEN t.order_status = '01' THEN
'待支付'
WHEN t.order_status = '02' THEN
'已支付'
WHEN t.order_status = '03' THEN
'已取消'
END
) AS orderStatus,
t.order_time AS orderTime,
( CASE
WHEN t.purchase_method = '01' THEN
'年'
WHEN t.purchase_method = '02' THEN
'季'
WHEN t.purchase_method = '03' THEN
'月'
WHEN t.purchase_method = '04' THEN
'次'
END
) AS purchaseMethod,
t2.data_name AS dataName,
t4.department_name as departmentName
FROM
t_order t
JOIN t_order_goods_info t1 ON t.order_id = t1.order_id
JOIN t_data_goods t2 ON t2.data_goods_id = t1.data_goods_id
join t_mall_customer t3 on t.customer_id = t3.customer_id
join t_department t4 on t3.department_id = t4.department_id
${ew.customSqlSegment}
</select>
<select id="getMoneyAndOrderTotalDto"
resultType="com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto">
SELECT
t1.orderTotal,
t2.transactionMoney
FROM
(SELECT
count(order_id ) AS orderTotal ,
customer_id as customerId
FROM
t_order
WHERE
1 = 1
AND del_flag = 'N'
AND order_status = '02'
AND customer_id = #{customerId}
<if test="day != null and day != ''">
and date(order_time) = curdate()
</if>
<if test="day != null and day != ''">
and date(order_time) = curdate()
</if>
<if test="weeks != null and weeks != ''">
and date(order_time) >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
</if>
<if test="month != null and month != ''">
and date(order_time) >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)
</if>
) t1,
( SELECT
ifnull( sum( payment_money ), 0 ) AS transactionMoney
FROM
t_order
WHERE
1 = 1
AND order_status = '02'
AND customer_id = #{customerId}
<if test="day != null and day != ''">
and date(order_time) = curdate()
</if>
<if test="weeks != null and weeks != ''">
and date(order_time) >= DATE_SUB(CURDATE(), INTERVAL 7 DAY)
</if>
<if test="month != null and month != ''">
and date(order_time) >= DATE_SUB(CURDATE(), INTERVAL 1 MONTH)
</if>
) t2
</select>
<select id="queryPageListByPurchaser" resultType="com.jz.dm.mall.moduls.controller.order.bean.OrderByPurchaserDto">
</select>
<select id="getApiKey" resultType="java.lang.String">
select api_key from t_order where customer_id = #{customerId}
</select>
</mapper> </mapper>
\ No newline at end of file
...@@ -44,7 +44,11 @@ ...@@ -44,7 +44,11 @@
<groupId>com.jz.common</groupId> <groupId>com.jz.common</groupId>
<artifactId>jz-dm-common</artifactId> <artifactId>jz-dm-common</artifactId>
</dependency> </dependency>
<!-- validation校验-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- 引入boot-security权限框架 --> <!-- 引入boot-security权限框架 -->
<!-- <!--
<dependency> <dependency>
......
package com.jz.manage.moduls.controller.customer; package com.jz.manage.moduls.controller.customer;
import com.jz.common.bean.PageInfoResponse; import com.baomidou.mybatisplus.core.metadata.IPage;
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.common.utils.StatusCode; import com.jz.common.utils.StatusCode;
import com.jz.manage.moduls.controller.BaseController; import com.jz.manage.moduls.controller.BaseController;
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;
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;
import com.jz.manage.moduls.service.DepartmentService; import com.jz.manage.moduls.service.DepartmentService;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
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;
...@@ -46,16 +44,8 @@ public class DepartmentController extends BaseController { ...@@ -46,16 +44,8 @@ public class DepartmentController extends BaseController {
*/ */
@PostMapping(value = "/findList") @PostMapping(value = "/findList")
@ApiOperation(value = "条件分页查询企业审核信息") @ApiOperation(value = "条件分页查询企业审核信息")
public PageInfoResponse<EnterpriseAuditDto> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception { public Result<IPage<EnterpriseAuditDto>> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception {
PageInfoResponse<EnterpriseAuditDto> pageInfo = new PageInfoResponse<>(); return departmentService.findList(auditRequest, req);
try {
pageInfo = departmentService.findList(auditRequest, req);
}catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
} }
/** /**
...@@ -66,27 +56,25 @@ public class DepartmentController extends BaseController { ...@@ -66,27 +56,25 @@ public class DepartmentController extends BaseController {
*/ */
@GetMapping(value = "/getDepartment/{id}") @GetMapping(value = "/getDepartment/{id}")
@ApiOperation(value = "主键查询用户企业详情信息") @ApiOperation(value = "主键查询用户企业详情信息")
public Result<CompanyDetailsDto> 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) {
CompanyDetailsDto companyDetails = departmentService.selectById(id); return departmentService.selectById(id);
return new Result<CompanyDetailsDto>(true, "查询企业详情成功!", StatusCode.OK, companyDetails);
} }
return new Result<CompanyDetailsDto>(false, "查询企业详情失败!", StatusCode.ERROR); return Result.error("查询企业详情失败");
} }
/** /**
* 企业审核接口 * 企业审核接口
* @param id * @param
* @return * @return
*/ */
@PostMapping(value = "/audit/{id}") @PostMapping(value = "/audit")
@ApiOperation(value = "企业审核") @ApiOperation(value = "企业审核")
public Result audit(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{ public Result audit(@RequestBody DepartmentAuditReq req) throws Exception{
if (id != null) { if (!StringUtils.isEmpty(req)) {
departmentService.audit(id, req); return departmentService.audit(req);
return new Result<CompanyDetailsDto>(true, "企业审核成功!", StatusCode.OK);
} }
return new Result<CompanyDetailsDto>(false, "企业审核失败!", StatusCode.ERROR); return Result.error("企业审核失败");
} }
/** /**
...@@ -100,9 +88,8 @@ public class DepartmentController extends BaseController { ...@@ -100,9 +88,8 @@ public class DepartmentController extends BaseController {
@ApiOperation(value = "添加用户") @ApiOperation(value = "添加用户")
public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception { public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception {
if (saveCustomerRequest != null) { if (saveCustomerRequest != null) {
Result result = departmentService.add(saveCustomerRequest, req); return departmentService.add(saveCustomerRequest, req);
return result;
} }
return new Result<CompanyDetailsDto>(false, "添加用户失败!", StatusCode.ERROR); return Result.error("添加用户失败!");
} }
} }
\ No newline at end of file
...@@ -41,5 +41,12 @@ public class CompanyDetailsDto { ...@@ -41,5 +41,12 @@ public class CompanyDetailsDto {
@ApiModelProperty(value = "开户行地址") @ApiModelProperty(value = "开户行地址")
private String bankName; private String bankName;
@ApiModelProperty(value = "用户角色")
private String roleId;
@ApiModelProperty(value = "审核状态")
private String auditStatus;
@ApiModelProperty(value = "驳回原因")
private String rejectReason;
} }
...@@ -3,6 +3,7 @@ package com.jz.manage.moduls.controller.customer.bean.dto; ...@@ -3,6 +3,7 @@ package com.jz.manage.moduls.controller.customer.bean.dto;
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;
import lombok.Data;
import java.util.Date; import java.util.Date;
...@@ -12,6 +13,7 @@ import java.util.Date; ...@@ -12,6 +13,7 @@ import java.util.Date;
* @Date: 2020/12/10 * @Date: 2020/12/10
* @Version: * @Version:
*/ */
@Data
@ApiModel(value = "企业审核信息返回参数") @ApiModel(value = "企业审核信息返回参数")
public class EnterpriseAuditDto { public class EnterpriseAuditDto {
...@@ -36,59 +38,6 @@ public class EnterpriseAuditDto { ...@@ -36,59 +38,6 @@ public class EnterpriseAuditDto {
@ApiModelProperty(value = "审核时间") @ApiModelProperty(value = "审核时间")
private Date auditTime; private Date auditTime;
public Long getDepartmentId() { @ApiModelProperty(value = "企业角色")
return departmentId; private Long roleId;
}
public void setDepartmentId(Long departmentId) {
this.departmentId = departmentId;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
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 getAuditStatus() {
return auditStatus;
}
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
public Date getCreTime() {
return creTime;
}
public void setCreTime(Date creTime) {
this.creTime = creTime;
}
public Date getAuditTime() {
return auditTime;
}
public void setAuditTime(Date auditTime) {
this.auditTime = auditTime;
}
} }
package com.jz.manage.moduls.controller.customer.bean.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/18
* @Version:
*/
@Data
@ApiModel(value = "企业审核请求状态参数")
public class DepartmentAuditReq implements Serializable {
@ApiModelProperty(value = "企业id")
private Long departmentId;
@ApiModelProperty(value = "审核状态 01通过,02未通过")
private String auditStatus;
@ApiModelProperty(value = "驳回原因")
private String rejectReason;
}
...@@ -4,6 +4,9 @@ import com.jz.common.bean.BasePageBean; ...@@ -4,6 +4,9 @@ import com.jz.common.bean.BasePageBean;
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;
import lombok.Data;
import java.util.Date;
/** /**
* @ClassName: * @ClassName:
...@@ -12,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty; ...@@ -12,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
* @Version: * @Version:
*/ */
@ApiModel(value = "企业审核信息请求参数封装") @ApiModel(value = "企业审核信息请求参数封装")
@Data
public class EnterpriseAuditRequest extends BasePageBean { public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "企业地址") @ApiModelProperty(value = "企业地址")
...@@ -26,35 +30,12 @@ public class EnterpriseAuditRequest extends BasePageBean { ...@@ -26,35 +30,12 @@ public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "审核状态") @ApiModelProperty(value = "审核状态")
private String auditStatus; private String auditStatus;
public String getRegisteredAddress() { @ApiModelProperty(value = "搜索")
return registeredAddress; private String search;
}
public void setRegisteredAddress(String registeredAddress) {
this.registeredAddress = registeredAddress;
}
public String getDepartmentName() {
return departmentName;
}
public void setDepartmentName(String departmentName) {
this.departmentName = departmentName;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getAuditStatus() { @ApiModelProperty(value = "提交时间")
return auditStatus; private String creTime;
}
public void setAuditStatus(String auditStatus) { @ApiModelProperty(value = "企业角色")
this.auditStatus = auditStatus; private Long roleId;
}
} }
...@@ -6,6 +6,7 @@ import com.jz.common.bean.BasePageBean; ...@@ -6,6 +6,7 @@ import com.jz.common.bean.BasePageBean;
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;
import lombok.Data;
import java.math.BigDecimal; import java.math.BigDecimal;
...@@ -16,6 +17,7 @@ import java.math.BigDecimal; ...@@ -16,6 +17,7 @@ import java.math.BigDecimal;
* @Version: * @Version:
*/ */
@ApiModel(value = "用户添加信息请求参数封装") @ApiModel(value = "用户添加信息请求参数封装")
@Data
public class SaveCustomerRequest extends BasePageBean { public class SaveCustomerRequest extends BasePageBean {
@ApiModelProperty(value = "企业id") @ApiModelProperty(value = "企业id")
@TableId(value = "department_id",type = IdType.AUTO) @TableId(value = "department_id",type = IdType.AUTO)
...@@ -57,108 +59,6 @@ public class SaveCustomerRequest extends BasePageBean { ...@@ -57,108 +59,6 @@ public class SaveCustomerRequest extends BasePageBean {
@ApiModelProperty(value = "充值金额") @ApiModelProperty(value = "充值金额")
private BigDecimal balanceMoney; private BigDecimal balanceMoney;