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 {
private String status;
@ApiModelProperty(value = "ApiKey")
private String apiKey;
@ApiModelProperty(value = "客户请求token")
private String requestToken;
}
package com.jz.common.bean;
import com.jz.common.enums.UserTypeEnum;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
......@@ -13,30 +13,41 @@ import java.io.Serializable;
* @Version:
*/
@ApiModel
@Data
public class MallCustomerApiDto implements Serializable {
private static final long serialVersionUID = 8769496459018372044L;
@ApiModelProperty(value = "用户id")
/**
* 用户id
*/
@ApiModelProperty(value = "账户id")
private Long customerId;
@ApiModelProperty(value = "用户类型")
private UserTypeEnum userTypeEnum;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Long departmentId;
/**
* 密码
*/
@ApiModelProperty(value = "密码")
private String password;
/**
* 账户
*/
@ApiModelProperty(value = "账户")
private String customerAccount;
/**
* 用户真实姓名
*/
@ApiModelProperty(value = "用户真实姓名")
@ApiModelProperty(value = "真实姓名")
private String customerName;
/**
* 联系电话
*/
@ApiModelProperty(value = "电话")
private String customerPhone;
/**
* 资产账户id
......@@ -44,55 +55,9 @@ public class MallCustomerApiDto implements Serializable {
@ApiModelProperty(value = "资产账户id")
private String assetsId;
public static long getSerialVersionUID() {
return serialVersionUID;
}
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;
}
@ApiModelProperty(value = "头像")
private String headPortraitUrl;
public void setAssetsId(String assetsId) {
this.assetsId = assetsId;
}
@ApiModelProperty(value = "角色")
private String roleId;
}
......@@ -5,4 +5,6 @@ public interface RedisMessageConstant {
static final String SENDTYPE_LOGIN = "002"; // 用于缓存注册用户时发送的验证码
static final String SENDTYPE_LOGIN_CUSTOMER = "003";
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 {
* 执行成功
*/
SUCCESS("执行成功"),
LOGIN_SUCCESS("登陆成功"),
LOGIN_ERROR("登陆失败"),
PAY_FAILURE("支付失败"),
PAY_SUCCESS("支付成功"),
IN_PROCESS("正在处理中"),
......
......@@ -37,7 +37,7 @@ public class DataGoods implements Serializable {
private Long userId;
@ApiModelProperty(value = "唯一数据商品标识")
private String apiOpenId;
private String apiOpenid;
/**
* 数据商品名称
*/
......
......@@ -2,6 +2,7 @@ package com.jz.common.entity;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
......@@ -14,6 +15,7 @@ import java.util.Date;
*/
@TableName("t_department")
@ApiModel
@Data
public class Department implements Serializable {
private static final long serialVersionUID = -86955761674824098L;
/**
......@@ -36,6 +38,8 @@ public class Department implements Serializable {
* 城市
*/
private String city;
private String linkman;
/**
* 行业
*/
......@@ -134,236 +138,4 @@ public class Department implements Serializable {
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 {
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 @@
<groupId>org.springframework.session</groupId>
<artifactId>spring-session-data-redis</artifactId>
</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权限框架 -->
<!--
<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;
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.CompanyUpdateReq;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.service.CompanyAuthService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -51,8 +50,8 @@ public class CompanyAuthController {
*/
@GetMapping("/findCompany")
@ApiOperation(value = "企业认证信息查询")
public Mono<Result> selectCompany(@RequestParam(value = "type") String type,HttpServletRequest request) {
return Mono.fromSupplier(() ->Result.of_success(companyAuthService.selectCompany(type,request)));
public Result selectCompany(@RequestParam(value = "type") String type,HttpServletRequest request) {
return companyAuthService.selectCompany(type,request);
}
/**
* @Description: 企业认证信息更新
......@@ -74,4 +73,18 @@ public class CompanyAuthController {
public Mono<Result> checkCompany(HttpServletRequest 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 {
@ApiModelProperty(name = "企业名称",required = true)
@ApiModelProperty(value = "企业名称",required = true)
@NotNull(message = "企业名称不能为空")
private String departmentName;
@ApiModelProperty(name = "省",required = true)
@ApiModelProperty(value = "省",required = true)
@NotNull(message = "省信息不能为空")
private String province;
@ApiModelProperty(name = "市",required = true)
@ApiModelProperty(value = "市",required = true)
@NotNull(message = "市信息不能为空")
private String city;
@ApiModelProperty(name = "公司详细地址",required = true)
@ApiModelProperty(value = "公司详细地址",required = true)
@NotNull(message = "公司详细地址不能为空")
private String registeredAddress;
@ApiModelProperty(name = "统一社会编码",required = true)
@NotNull(message = "统一社会编码不能为空")
@ApiModelProperty(value = "统一社会编码",required = true)
@NotNull(message = "统一社会编码不能为空")
private String unifiedCreditCode;
@ApiModelProperty(name = "营业执照照片",required = true)
@NotNull(message = "营业执照照片不能为空")
@ApiModelProperty(value = "营业执照照片",required = true)
@NotNull(message = "营业执照照片不能为空")
private String businessLicense;
@ApiModelProperty(name = "开户银行",required = true)
@ApiModelProperty(value = "开户银行",required = true)
@NotNull(message = "开户银行不能为空")
private String bankName;
@ApiModelProperty(name = "银行账户",required = true)
@ApiModelProperty(value = "银行账户",required = true)
@NotNull(message = "银行账户不能忍为空")
private String bankCardNumber;
@ApiModelProperty(name = "联系人名称",required = true)
@ApiModelProperty(value = "联系人名称",required = true)
@NotNull(message = "联系人名称不能为空")
private String linkman;
@ApiModelProperty(name = "联系人电话",required = true)
@ApiModelProperty(value = "联系人电话",required = true)
@NotNull(message = "联系人电话不能为空")
private String telephone;
@ApiModelProperty(name = "登录用户id",hidden = true)
@ApiModelProperty(value = "登录用户id",hidden = true)
private Long loginId;
@ApiModelProperty(name = "登录用户名称",hidden = true)
@ApiModelProperty(value = "登录用户名称",hidden = true)
private String loginName;
@ApiModelProperty(value = "用户角色 2:卖方,3:买方")
private Long roleId;
}
......@@ -38,4 +38,6 @@ public class CompanyInfoDto implements Serializable {
private String departmentId;
@ApiModelProperty(value = "审核状态:01待审核,02已审核,03未通过")
private String auditStatus;
@ApiModelProperty(value = "用户角色:2卖方,3买方")
private Long roleId;
}
package com.jz.dm.mall.moduls.controller.customer;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.utils.Result;
import com.jz.common.utils.SessionUtils;
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.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.service.MallCustomerService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.apache.catalina.servlet4preview.http.HttpServletRequest;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -20,7 +20,7 @@ import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import java.util.Map;
/**
......@@ -48,31 +48,10 @@ public class LoginController {
* @return
*/
@PostMapping(value = "/login")
@ApiOperation(value = "登录功能", notes = "登录功能")
public Result<CustomerDto> login(@RequestBody LoginRequest customer, HttpServletRequest request) throws Exception {
String username = customer.getUsername();
String password = customer.getPassword();
// 手机
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);
@ApiOperation(value = "登陆功能")
public Result result(@RequestBody LoginRequest customer) {
Result result = mallCustomerService.loginByUser(customer);
return result;
}
/**
......
......@@ -26,6 +26,7 @@ import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import javax.servlet.http.HttpSession;
import java.util.Map;
import java.util.concurrent.TimeUnit;
/**
* 商城用户(MallCustomer)表控制层
......@@ -54,28 +55,8 @@ public class MallCustomerController extends BaseController {
@PostMapping("/saveCustomer")
@ApiOperation(value = "注册用户", notes = "添加用户")
public Result saveCustomer(@RequestBody CustomerRequest customer, HttpServletRequest request) throws Exception{
if (!StringUtils.isEmpty(customer)) {
String ph = "^[1][34578]\\d{9}$";
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);
Result result = mallCustomerService.saveCustomer(customer);
return result;
}
......@@ -86,9 +67,9 @@ public class MallCustomerController extends BaseController {
@GetMapping("/getLoginUserName")
@ApiOperation(value = "获取当前登录用户信息")
public Result getLoginUserName (HttpServletRequest request) throws Exception{
// 从session中获取id
// 从redis中获取id
try {
MallCustomerApiDto mallCustomer = (MallCustomerApiDto) SessionUtils.getUserCurrent(request,"mallCustomer");
MallCustomerApiDto mallCustomer = (MallCustomerApiDto) redisTemplate.opsForValue().get("USER_" + RedisMessageConstant.SENDTYPE_LOGIN_CUSTOMER);
// Long customerId = 1L;
Long customerId = mallCustomer.getCustomerId();
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;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
/**
* @ClassName: CustomerDto
......@@ -11,7 +14,8 @@ import io.swagger.annotations.ApiModelProperty;
* @Version 1.0
*/
@ApiModel(value = "商城用户--返回参数对象", description = "返回参数对象")
public class CustomerDto {
@Data
public class CustomerDto implements Serializable {
/**
* 用户id
......@@ -53,67 +57,6 @@ public class CustomerDto {
@ApiModelProperty(value = "头像")
private String headPortraitUrl;
public String getHeadPortraitUrl() {
return headPortraitUrl;
}
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;
}
@ApiModelProperty(value = "角色")
private String roleId;
}
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 {
*/
@PostMapping(value = "/getAccountMoney")
@ApiOperation(value = "充值----保存充值金额", notes = "保存充值金额")
@ApiParam()
public Result<Object> uptAccountMoney(@RequestBody FinanceCustomerBalanceRequest customerBalanceRequest, HttpServletRequest requset) throws Exception {
if (StringUtils.isEmpty(customerBalanceRequest.getAssetsId().toString())) { //企业资产id
return Result.error("参数不能为空!");
......
......@@ -33,6 +33,8 @@ public class FinanceCashOutRequest implements Serializable {
@ApiModelProperty(value = "提现备注")
private String remark;
public Long getAssetsId() {
return assetsId;
}
......
......@@ -5,8 +5,10 @@ import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
import com.jz.common.bean.PageInfoResponse;
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.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.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods;
......@@ -27,7 +29,7 @@ import javax.servlet.http.HttpServletRequest;
*/
@RestController
@RequestMapping("dataGoods")
@Api(tags = "数据商品--controller")
@Api(tags = "数据商品管理--controller")
public class DataGoodsController extends BaseController {
/**
* 服务对象
......@@ -35,26 +37,6 @@ public class DataGoodsController extends BaseController {
@Autowired
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
......@@ -92,17 +74,17 @@ public class DataGoodsController extends BaseController {
return baseResponse;
}
/**新增数据商品
/**修改数据商品
* @param dataGoods
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/add")
public BaseBeanResponse<DataGoods> add(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
@RequestMapping(method = RequestMethod.POST, value = "/edit")
public BaseBeanResponse<DataGoods> edit(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>();
try {
baseBeanResponse = dataGoodsService.add(dataGoods, httpRequest);
baseBeanResponse = dataGoodsService.edit(dataGoods, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("新增失败");
baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
......@@ -110,22 +92,42 @@ public class DataGoodsController extends BaseController {
return baseBeanResponse;
}
/**修改数据商品
* @param dataGoods
/**
* 列表查询商品数据
* @param dataGoodsListRequest
* @param httpRequest
* @return
*/
@RequestMapping(method = RequestMethod.POST, value = "/edit")
public BaseBeanResponse<DataGoods> edit(@RequestBody DataGoods dataGoods, HttpServletRequest httpRequest){
BaseBeanResponse<DataGoods> baseBeanResponse = new BaseBeanResponse<DataGoods>();
@PostMapping(value = "/findList")
@ApiOperation(value = "分页展示商品列表", notes = "首页点击分类展示商品列表")
public PageInfoResponse<DataGoodsListDto> findByCategory(@RequestBody DataGoodsListRequest dataGoodsListRequest, HttpServletRequest httpRequest) {
PageInfoResponse<DataGoodsListDto> pageInfo = new PageInfoResponse<DataGoodsListDto>();
try {
baseBeanResponse = dataGoodsService.edit(dataGoods, httpRequest);
pageInfo = dataGoodsService.findList(dataGoodsListRequest, httpRequest);
} catch (Exception e) {
baseBeanResponse.setMessage("修改失败");
baseBeanResponse.setCode(Constants.FAILURE_CODE);
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
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;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
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.OrderRequest;
import com.jz.dm.mall.moduls.controller.order.bean.SaltResetReq;
import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.service.OrderService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
......@@ -54,6 +54,24 @@ public class OrderController {
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;
import com.fasterxml.jackson.annotation.JsonFormat;
import com.jz.common.bean.BasePageBean;
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;
......@@ -14,8 +17,9 @@ import java.util.Date;
* @since 2020-12-01 10:41:40
*/
@ApiModel
public class OrderDto {
@ApiModel(value = "订单管理-列表展示")
@Data
public class OrderDto implements Serializable {
private static final long serialVersionUID = 651546246975691600L;
/**
* 订单id
......@@ -46,7 +50,7 @@ public class OrderDto {
* 订单时间
*/
@ApiModelProperty(value = "订单时间")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
@JsonFormat(pattern="yyyy-MM-dd HH:mm:ss",timezone = "GMT+8")
private Date orderTime;
/**
* 卖家id
......@@ -140,213 +144,4 @@ public class OrderDto {
*/
@ApiModelProperty(value = "数据分类")
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;
import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
/**
* 订单表(TOrder)实体类
......@@ -11,7 +12,8 @@ import io.swagger.annotations.ApiModelProperty;
* @since 2020-12-01 10:41:40
*/
@ApiModel
@ApiModel(value = "订单管理-api订单列表请求参数")
@Data
public class OrderRequest extends BasePageBean {
private static final long serialVersionUID = 651546246975691600L;
/**
......@@ -39,45 +41,11 @@ public class OrderRequest extends BasePageBean {
*/
@ApiModelProperty(value = "数据分类")
private String dataType;
@ApiModelProperty(value = "订单时间")
private String orderTime;
@ApiModelProperty(value = "价格类型")
private String priceType;
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 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;
}
@ApiModelProperty(value = "搜索")
private String search;
}
\ 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;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -15,6 +16,7 @@ import java.util.Date;
*/
@TableName("t_data_goods")
@ApiModel
@Data
public class DataGoods implements Serializable {
private static final long serialVersionUID = 938517475031285541L;
/**
......@@ -122,213 +124,6 @@ public class DataGoods implements Serializable {
*/
private BigDecimal secondType;
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;
}
private String apiOpenid;
}
\ 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;
......@@ -14,11 +18,14 @@ import java.util.Date;
*/
@TableName("t_data_goods_api")
@ApiModel
@Data
public class DataGoodsApi implements Serializable {
private static final long serialVersionUID = -14346819849726413L;
/**
* api商品id
*/
@ApiModelProperty(value = "主健ID")
@TableId(value = "id", type = IdType.AUTO)
private Long goodsApi;
/**
* 数据id
......@@ -81,133 +88,23 @@ public class DataGoodsApi implements Serializable {
*/
private String delFlag;
/**
* 加密方式
*/
private String encryMode;
public Long getGoodsApi() {
return goodsApi;
}
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;
}
/**
* 传输方式
*/
private String transMode;
public Date getUptTime() {
return uptTime;
}
/**
* 版本号
*/
private String versionNumber;
public void setUptTime(Date uptTime) {
this.uptTime = uptTime;
}
private String apiType;
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;
import com.baomidou.mybatisplus.annotation.TableName;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import java.io.Serializable;
import java.math.BigDecimal;
......@@ -15,6 +16,7 @@ import java.util.Date;
*/
@TableName("t_finance_customer_balance")
@ApiModel
@Data
public class FinanceCustomerBalance implements Serializable {
private static final long serialVersionUID = -13102196689933511L;
/**
......@@ -55,76 +57,6 @@ public class FinanceCustomerBalance implements Serializable {
private String rejectReason;
public Long getCustomerBalanceId() {
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;
}
private Date balanceTime;
}
\ 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;
import com.jz.common.base.BaseMapper;
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.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.ResultType;
import org.apache.ibatis.annotations.Select;
import java.util.List;
/**
* 企业(TDepartment)表数据库访问层
*
......@@ -45,4 +51,23 @@ public interface DepartmentDao extends BaseMapper<Department> {
* @return
*/
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
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;
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.entity.MallCustomer;
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.Param;
......@@ -71,4 +73,20 @@ public interface MallCustomerDao extends BaseMapper<MallCustomer> {
*/
List<MallMenu> getMenu(@Param("userId") Long userId,
@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;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.base.BaseMapper;
import com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto;
import com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto;
import com.jz.dm.mall.moduls.controller.order.bean.OrderDto;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.customer.bean.dto.PurchaserUserCenterDto;
import com.jz.dm.mall.moduls.controller.order.bean.*;
import com.jz.dm.mall.moduls.entity.Order;
import org.apache.ibatis.annotations.Param;
......@@ -46,4 +48,13 @@ public interface OrderDao extends BaseMapper<Order> {
* @param 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 {
*/
Result checkCompanyInfo(HttpServletRequest request);
Result getProvince();
Result getCity(String provinceCode,String cityCode);
}
......@@ -4,8 +4,10 @@ import com.jz.common.bean.BaseBeanResponse;
import com.jz.common.bean.BaseResponse;
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.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.DataGoodsRequest;
import com.jz.dm.mall.moduls.entity.DataGoods;
......@@ -32,7 +34,7 @@ public interface DataGoodsService {
/**新增数据商品
* @param DataGoods
* @param
* @param httpRequest
* @return
* @throws Exception
......@@ -40,7 +42,7 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoods> add(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception;
/**主键查询数据商品
* @param DataGoodsRequest
* @param
* @param httpRequest
* @return
* @throws Exception
......@@ -48,7 +50,7 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoodsDto> findById(DataGoodsRequest dataGoodsRequest, HttpServletRequest httpRequest)throws Exception;
/**修改数据商品
* @param DataGoods
* @param
* @param httpRequest
* @return
* @throws Exception
......@@ -56,11 +58,16 @@ public interface DataGoodsService {
public BaseBeanResponse<DataGoods> edit(DataGoods dataGoods, HttpServletRequest httpRequest)throws Exception;
/**主键删除数据商品
* @param DataGoodsRequest
* @param
* @param httpRequest
* @return
* @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;
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.req.CustomerRequest;
import com.jz.dm.mall.moduls.controller.customer.bean.req.LoginRequest;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import javax.servlet.http.HttpServletRequest;
......@@ -34,7 +35,7 @@ public interface MallCustomerService {
* 注册账号
* @param customerRequest
*/
void saveCustomer(CustomerRequest customerRequest);
Result saveCustomer(CustomerRequest customerRequest);
/**
* 通过手机号查询是否已注册
......@@ -65,6 +66,13 @@ public interface MallCustomerService {
*/
Result getMenu(Long userId, Long roleId);
/**
* 登陆
* @param customer
* @return
*/
Result loginByUser(LoginRequest customer);
// /**
// * 忘记密码
// * @param customer
......
package com.jz.dm.mall.moduls.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.bean.PageInfoResponse;
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.OrderRequest;
import com.jz.dm.mall.moduls.controller.order.bean.SaltResetReq;
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 javax.servlet.http.HttpServletRequest;
import java.util.Map;
......@@ -30,4 +31,13 @@ public interface OrderService {
* @return
*/
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;
import com.jz.common.base.CurrentUser;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultCode;
import com.jz.common.constant.ResultMsg;
import com.jz.common.entity.Department;
import com.jz.common.enums.UserTypeEnum;
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.dto.CompanyInfoDto;
import com.jz.dm.mall.moduls.entity.FinanceCustomerAssets;
import com.jz.dm.mall.moduls.entity.MallCustomer;
import com.jz.dm.mall.moduls.entity.*;
import com.jz.common.utils.Result;
import com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq;
import com.jz.dm.mall.moduls.mapper.DepartmentDao;
......@@ -20,6 +18,8 @@ import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
import com.jz.dm.mall.moduls.service.CompanyAuthService;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
......@@ -30,7 +30,9 @@ import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Date;
import java.util.concurrent.TimeUnit;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
/**
* @author ZC
......@@ -45,7 +47,7 @@ import java.util.concurrent.TimeUnit;
@Service("companyAuthService")
@Slf4j
public class CompanyAuthServiceImpl implements CompanyAuthService {
private static final Logger logger = LoggerFactory.getLogger(CompanyAuthServiceImpl.class);
@Resource
private DepartmentDao departmentDao;
@Resource
......@@ -65,7 +67,14 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
public Result addCompanyData(CompanyAddReq req, HttpServletRequest request) {
//获取当前用户ID判断当前用户是否已经关联企业
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) {
return Result.of_error(ResultMsg.USER_NOT_EXIST);
}
......@@ -76,6 +85,7 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
if (null != mallCustomer.getDepartmentId()) {
return Result.of_error("用户已关联企业,请勿重复操作");
}
req.setLoginId(mallCustomer.getCustomerId());
req.setLoginName(currentUser.getCustomerName());
if (StringUtils.isNotBlank(req.getDepartmentName()) ||
......@@ -85,7 +95,11 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return Result.of_error("企业用户信息已存在");
}
}
insetCompany(req);
Boolean aBoolean = insetCompany(req);
if (!aBoolean) {
throw ResponseException.of_error("添加失败");
}
return Result.of_success(ResultMsg.SUCCESS);
}
......@@ -151,9 +165,9 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
return Result.of_error("更新企业用户信息与绑定企业信息不一致");
}
Department department = new Department();
BeanUtils.copyProperties(req, department);
department.setUptTime(new Date());
department.setUptPerson(req.getLoginName());
BeanUtils.copyProperties(req, department);
if (departmentDao.updateById(department) != 1) {
throw ResponseException.of_error("更新企业信息失败");
}
......@@ -176,7 +190,45 @@ public class CompanyAuthServiceImpl implements CompanyAuthService {
if (null != companyInfoDto && "02".equals(companyInfoDto.getAuditStatus())) {
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 {
*
* @param req
*/
private void insetCompany(CompanyAddReq req) {
private Boolean insetCompany(CompanyAddReq req) {
//保存企业信息
Department departmentInset = new Department();
departmentInset.setAuditStatus("01");//待审核
departmentInset.setCreTime(new Date());
departmentInset.setCrePerson(req.getLoginName());
departmentInset.setCrePerson(getUser().getCustomerId() + "");
BeanUtils.copyProperties(req, departmentInset);
if (departmentDao.insertDepart(departmentInset) != 1) {
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();
finance.setDepartmentId(departmentInset.getDepartmentId());//企业ID
finance.setCreTime(new Date());
finance.setCrePerson(req.getLoginName());
finance.setCrePerson(getUser().getCustomerId() + "");
if (financeCustomerAssetsDao.insertFinanceCustome(finance) != 1) {
throw ResponseException.of_error("初始化用户资产失败");
}
//更新用户企业信息
//MallCustomer mallCustomer = new MallCustomer();
//mallCustomer.setCustomerId(req.getLoginId());//用户ID
//mallCustomer.setDepartmentId(departmentInset.getDepartmentId());
//mallCustomer.setUptTime(new Date());
//mallCustomer.setUptPerson(req.getLoginName());
//if (mallCustomerDao.updateById(mallCustomer) != 1) {
// throw ResponseException.of_error("更新用户企业信息失败");
//}
logger.info("###############################企业添加:初始化用户资产成功####################################");
// 添加角色
if (req.getRoleId() != null) {
MallUserRole role = new MallUserRole();
role.setCustomerId(getUser().getCustomerId());
if (2 == req.getRoleId()) {
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;
import com.baomidou.mybatisplus.extension.api.R;
import com.jz.common.constant.ResultMsg;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode;
......@@ -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.service.FinanceCustomerAssetsService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.scheduling.annotation.Async;
import org.springframework.stereotype.Service;
......@@ -28,6 +31,8 @@ import java.util.Date;
*/
@Service("financeCustomerAssetsService")
public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsService {
private static final Logger logger = LoggerFactory.getLogger(FinanceCustomerAssetsServiceImpl.class);
@Autowired
private FinanceCustomerAssetsDao assetsDao;
......@@ -67,7 +72,10 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe
assets.setUptTime(DateUtils.getToday());
assets.setUptPerson(req.getUserId() + "");
assets.setDelFlag("N");
assetsDao.updateMoney(assets);
if (assetsDao.updateMoney(assets) != 1){
throw ResponseException.of_error("修改金额失败!");
}
logger.info("##########################查询余额:修改冻结金额成功###############################");
return Result.of_success("余额充足!");
}
return Result.of_error("查询失败!");
......@@ -121,7 +129,11 @@ public class FinanceCustomerAssetsServiceImpl implements FinanceCustomerAssetsSe
assets.setUptPerson(req.getUserId() + "");
assets.setUptTime(DateUtils.getToday());
assets.setDelFlag("N");
assetsDao.updateMoney(assets);
if (assetsDao.updateMoney(assets) != 1) {
throw ResponseException.of_error("修改金额失败!");
}
logger.info("##########################解冻金额:修改金额成功!###############################");
return result;
}
......
......@@ -8,6 +8,7 @@ import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.enums.AuditStatusEnum;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.CommonsUtil;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.Result;
......@@ -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.service.FinanceTradeFlowService;
import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Propagation;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
......@@ -42,6 +46,7 @@ import java.util.concurrent.TimeUnit;
@Service("financeTradeFlowService")
@Transactional
public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
private static final Logger logger = LoggerFactory.getLogger(FinanceTradeFlowServiceImpl.class);
@Autowired
private FinanceTradeFlowDao financeTradeFlowDao;
......@@ -58,7 +63,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
}
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public Boolean uptAccountMoney(FinanceCustomerBalanceRequest customerBalanceRequest) throws Exception {
if (customerBalanceRequest.getAssetsId() != null && StringUtils.isNotEmpty(customerBalanceRequest.getBalanceMoney().toString())) {
// 商城企业客户资产表 冻结金额
......@@ -70,13 +75,17 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
assets.setFrozenMoney(add);
assets.setUptPerson(getUser().getCustomerId() + "");
assets.setUptTime(DateUtils.getToday());
financeCustomerAssetsDao.updateMoney(assets);
if (financeCustomerAssetsDao.updateMoney(assets) != 1) {
throw ResponseException.of_error("冻结金额添加失败!");
}
logger.info("#########################充值金额:冻结金额添加成功!################################");
}
//1.充值记录表中加数据
FinanceCustomerBalance financeCustomerBalance = new FinanceCustomerBalance();
financeCustomerBalance.setAssetsId(customerBalanceRequest.getAssetsId());//企业资产id
financeCustomerBalance.setBalanceMoney(customerBalanceRequest.getBalanceMoney()); //充值金额
financeCustomerBalance.setCrePerson(getUser().getCustomerId()+ "");
financeCustomerBalance.setBalanceTime(DateUtils.getToday());
financeCustomerBalance.setCreTime(new Date());
financeCustomerBalance.setAuditStatus("01"); //待审核
financeCustomerBalance.setRemark(customerBalanceRequest.getRemark()); //备注
......@@ -85,7 +94,6 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
return len > 0;
}
return false;
}
@Override
......@@ -104,10 +112,10 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
}
@Override
@Transactional(rollbackFor = Exception.class)
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRES_NEW)
public Result<Object> addCashOutMoney(FinanceCashOutRequest financeCashOutRequest) throws Exception {
Result<Object> result = new Result<>();
Long assetId = financeCashOutRequest.getAssetsId(); // 企业资产id
Long assetsId = financeCashOutRequest.getAssetsId(); // 企业资产id
BigDecimal cashOutMoney = new BigDecimal(financeCashOutRequest.getCashOutMoney().toString()); //提现金额
FinanceCashOut financeCashOut = new FinanceCashOut();
......@@ -127,7 +135,8 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
}
// 查询 当前企业 可用余额 冻结金额
Map map = new HashMap();
map.put("assetId", assetId);
map.put("assetsId", assetsId);
FinanceCustomerAssetsDto dto = financeTradeFlowDao.queryAccountMoneyByMap(map);
BigDecimal useMoney = new BigDecimal(dto.getUseMoney().toString()); //可用金额
if (useMoney != null && cashOutMoney != null) {
......@@ -145,7 +154,7 @@ public class FinanceTradeFlowServiceImpl implements FinanceTradeFlowService {
assets.setUseMoney(useMoney);
assets.setFrozenMoney(djMoney);
assets.setTotalMoney(useMoney);
assets.setAssetsId(assetId);
assets.setAssetsId(assetsId);
int lens = financeCustomerAssetsDao.uptAccountMoney(assets);
if (lens == 0) {
result.setMessage("提交失败!");
......
package com.jz.dm.mall.moduls.service.impl;
import com.jz.common.base.CurrentUser;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg;
......@@ -9,19 +10,27 @@ import com.jz.common.enums.UserTypeEnum;
import com.jz.common.utils.DateUtils;
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.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.MallMenu;
import com.jz.dm.mall.moduls.entity.MallUserRole;
import com.jz.dm.mall.moduls.mapper.MallCustomerDao;
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.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Service;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpSession;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
import java.util.concurrent.TimeUnit;
import java.util.stream.Collectors;
......@@ -49,24 +58,6 @@ public class MallCustomerServiceImpl implements MallCustomerService {
@Override
public CustomerDto selectByAccount(String username, HttpServletRequest request) {
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;
}
......@@ -79,21 +70,6 @@ public class MallCustomerServiceImpl implements MallCustomerService {
@Override
public CustomerDto selectByPhone(String username, HttpServletRequest request) {
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;
}
......@@ -103,26 +79,47 @@ public class MallCustomerServiceImpl implements MallCustomerService {
* @param
*/
@Override
public void saveCustomer(CustomerRequest customerRequest) {
MallCustomer mallCustomer = new MallCustomer();
public Result saveCustomer(CustomerRequest customerRequest) {
// 获取验证码
String vailCode = customerRequest.getVailCode();
String username = customerRequest.getUsername();
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获取验证码
String key = RedisMessageConstant.SENDTYPE_LOGIN + "_" + telephone;
// String key = "18179617425";
String codeInRedis = (String) redisTemplate.opsForValue().get(key);
// String codeInRedis = "147826";
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);
Integer codeInRedis = (Integer) redisTemplate.opsForValue().get(key);
if (codeInRedis == null) {
return Result.of_error("验证码为空!");
}
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 {
}
/**
* 根据用户id,角色id查找菜单
* 根据用户id,角色id查找菜单
*
* @param userId
* @param roleId
......@@ -193,6 +190,57 @@ public class MallCustomerServiceImpl implements MallCustomerService {
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) {
List<MallMenu> children = all.stream().filter(sysMenuEntity -> {
......
package com.jz.dm.mall.moduls.service.impl;
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.PageInfo;
import com.jz.common.bean.MallCustomerApiDto;
......@@ -12,11 +15,15 @@ import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.DateUtils;
import com.jz.common.utils.HttpsUtilsTest;
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.entity.Order;
import com.jz.dm.mall.moduls.mapper.DepartmentDao;
import com.jz.dm.mall.moduls.mapper.OrderDao;
import com.jz.dm.mall.moduls.service.OrderService;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.redis.core.RedisTemplate;
......@@ -24,6 +31,8 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import javax.servlet.http.HttpServletRequest;
import java.math.BigDecimal;
import java.text.DateFormat;
import java.text.SimpleDateFormat;
import java.util.*;
......@@ -43,6 +52,9 @@ public class OrderServiceImpl implements OrderService {
//@Autowired
//private HttpsUtils httpsUtils;
@Autowired
private DepartmentDao departmentDao;
@Autowired
private RedisTemplate redisTemplate;
......@@ -131,7 +143,8 @@ public class OrderServiceImpl implements OrderService {
//调用gatway
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());
//处理返回的参数
JSONObject params = JSONObject.parseObject(s);
......@@ -148,8 +161,118 @@ public class OrderServiceImpl implements OrderService {
order.setUptTime(DateUtils.getToday());
order.setUptPerson(customer.getCustomerId() + "");
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;
import com.jz.common.constant.ResultMsg;
import com.jz.common.enums.auth.AuthModeEnum;
import com.jz.common.enums.auth.AuthTypeEnum;
import com.jz.common.exception.ResponseException;
import com.jz.common.utils.*;
import com.jz.dm.mall.moduls.controller.pay.dto.PayDto;
import com.jz.dm.mall.moduls.controller.pay.req.AuthMallUserApiReq;
......@@ -16,6 +17,8 @@ import com.jz.dm.mall.moduls.mapper.*;
import com.jz.dm.mall.moduls.service.PayService;
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.Value;
import org.springframework.stereotype.Service;
......@@ -37,7 +40,7 @@ import java.util.Date;
*/
@Service("payService")
public class PayServiceImpl implements PayService {
private static final Logger logger = LoggerFactory.getLogger(PayServiceImpl.class);
@Autowired
private OrderDao orderDao;
......@@ -155,7 +158,7 @@ public class PayServiceImpl implements PayService {
System.out.println(post);
JSONObject params = JSONObject.parseObject(post);
if (!params.get("code").equals(200) || StringUtils.isEmpty(params.get("data"))){
return Result.of_error("授权失败!");
throw ResponseException.of_error("授权失败!");
}
assets.setUseMoney(subtract);
assets.setTotalMoney(subtract);
......
......@@ -37,7 +37,12 @@ spring:
#oracle设为true,mysql设为false。分库分表较多推荐设置为false
poolPreparedStatements: false
maxPoolPreparedStatementPerConnectionSize: 20
rabbitmq:
host: localhost
port: 5672
virtual-host: testhost
username: admin
password: admin
cache:
type: CAFFEINE
caffeine:
......@@ -72,10 +77,22 @@ logging:
domain:
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:
url: 192.168.1.141
port: 21
username: ftpuser
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 @@
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
</sql>
<insert id="insertDepart">
<insert id="insertDepart" keyProperty="departmentId" useGeneratedKeys="true">
INSERT INTO t_department(
`department_name`,`province`,`city`,`linkman`,`telephone`,`registered_address`,`business_license`,
`tax_registration`, `depart_picture_time`,`business_license_time`,`unified_credit_code`, `bank_name`,
`bank_card_number`,`audit_status`,`cre_time`, `cre_person`) VALUES
(#{dep.departmentName},#{dep.province},#{dep.city},#{linkman},#{dep.telephone},#{registeredAddress},
#{dep.businessLicense},#{dep.unifiedCreditCode},#{bankName},#{bankCardNumber},#{auditStatus},NOW(),#{crePerson})
(#{dep.departmentName},#{dep.province},#{dep.city},#{dep.linkman},#{dep.telephone},#{dep.registeredAddress},
#{dep.businessLicense},#{dep.taxRegistration},#{dep.departPictureTime},#{dep.businessLicenseTime},#{dep.unifiedCreditCode},#{dep.bankName},#{dep.bankCardNumber},#{dep.auditStatus},#{dep.creTime},#{dep.crePerson})
</insert>
<select id="selectDepartmentData" resultType="com.jz.common.entity.Department" parameterType="com.jz.dm.mall.moduls.controller.company.bean.CompanyAddReq">
......@@ -67,17 +67,84 @@
</select>
<select id="selectCompanyDetail" resultType="com.jz.dm.mall.moduls.controller.company.dto.CompanyInfoDto">
SELECT
department_id AS departmentId,
audit_status AS auditStatus,
department_name AS departmentName,
registered_address AS registeredAddress,
business_license AS businessLicense,
bank_name AS bankName,
brank_card_number AS bankCardNumber,
linkman AS linkman,
telephone AS telephone
FROM t_department
WHERE department_id=#{departmentId} AND del_flag ='N'
t1.department_id AS departmentId,
t1.audit_status AS auditStatus,
t1.department_name AS departmentName,
t1.registered_address AS registeredAddress,
t1.business_license AS businessLicense,
t1.bank_name AS bankName,
t1.bank_card_number AS bankCardNumber,
t1.linkman AS linkman,
t1.telephone AS telephone,
t4.role_id as roleId
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 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>
\ No newline at end of file
......@@ -256,4 +256,54 @@
inner join t_mall_menu e on e.menu_id=d.menu_id
where a.customer_id=#{userId} and c.role_id = #{roleId}
</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>
\ No newline at end of file
......@@ -194,7 +194,7 @@
where assets_id = #{assetsId}
</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
<set>
<if test="departmentId != null">
......@@ -220,5 +220,5 @@
</if>
</set>
where assets_id = #{assetsId}
</insert>
</update>
</mapper>
\ No newline at end of file
......@@ -28,7 +28,7 @@
where 1=1 and audit_status ='01' and assets_id = #{assetsId}
</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,
reject_reason, pay_time, pay_person, remark, audit_status, cre_person, cre_time, del_flag)
values (#{assetsId}, #{cashOutMoney}, #{cashOutTime}, #{auditTime}, #{auditPerson}, #{rejectReason},
......
......@@ -258,15 +258,18 @@
<if test="categoryId != null">and t2.category_id = #{categoryId}</if>
<if test="orderStatus != null and orderStatus != ''">and t.order_status = #{orderStatus}</if>
<if test="orderTime != null">and t.order_time = #{orderTime}</if>
order By t.order_time DESC
</select>
<!--根据订单id 查询详情-->
<select id="getOrderDetail" resultType="com.jz.dm.mall.moduls.controller.order.bean.OrderDto" parameterType="map">
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,
(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 '月'
(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,
(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,
......@@ -281,23 +284,23 @@
</select>
<resultMap id="apiParamsInfo" type="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiDto">
<id column="goods_api" property="goodsApi" />
<result column="api_name" property="apiName" />
<result column="request_type" property="requestType" />
<result column="api_url" property="apiUrl" />
<result column="api_method" property="apiMethod" />
<result column="api_protocl" property="apiProtocl" />
<result column="return_data_example" property="returnDataExample" />
<result column="return_type" property="returnType" />
<result column="api_key" property="apiKey" />
<result column="request_token" property="requestToken" />
<id column="goods_api" property="goodsApi"/>
<result column="api_name" property="apiName"/>
<result column="request_type" property="requestType"/>
<result column="api_url" property="apiUrl"/>
<result column="api_method" property="apiMethod"/>
<result column="api_protocl" property="apiProtocl"/>
<result column="return_data_example" property="returnDataExample"/>
<result column="return_type" property="returnType"/>
<result column="api_key" property="apiKey"/>
<result column="request_token" property="requestToken"/>
<collection property="apiParamsDto" ofType="com.jz.dm.mall.moduls.controller.order.bean.DataGoodsApiParamsDto">
<id column="api_params_id" property="apiParamsId" />
<result column="params_diff" property="paramsDiff" />
<result column="params_name" property="paramsName" />
<result column="params_type" property="paramsType" />
<result column="params_desc" property="paramsDesc" />
<result column="if_requird" property="ifRequird" />
<id column="api_params_id" property="apiParamsId"/>
<result column="params_diff" property="paramsDiff"/>
<result column="params_name" property="paramsName"/>
<result column="params_type" property="paramsType"/>
<result column="params_desc" property="paramsDesc"/>
<result column="if_requird" property="ifRequird"/>
</collection>
</resultMap>
......@@ -325,14 +328,16 @@
t4.api_params_id as apiParamsId
from t_order t
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
left join t_data_goods_api_params t4 on t4.goods_api=t3.goods_api
where 1=1 and t.order_status='02'
<if test="orderId != null">and t.order_id = #{orderId}</if>
</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
t3.goods_api as goodsApi,
t3.api_name as apiName,
......@@ -347,13 +352,15 @@
t.goods_token as goodsToken
from t_order t
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
where 1=1 and t.order_status='02'
<if test="orderId != null">and t.order_id = #{orderId}</if>
</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
(case when t4.params_diff ='01' then '公共参数' when t4.params_diff ='02' then '请求参数'
when t4.params_diff ='03' then '响应参数'
......@@ -427,4 +434,97 @@
</set>
where order_id = #{orderId}
</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>
\ No newline at end of file
......@@ -44,7 +44,11 @@
<groupId>com.jz.common</groupId>
<artifactId>jz-dm-common</artifactId>
</dependency>
<!-- validation校验-->
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-validation</artifactId>
</dependency>
<!-- 引入boot-security权限框架 -->
<!--
<dependency>
......
package com.jz.manage.moduls.controller.customer;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result;
import com.jz.common.utils.StatusCode;
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.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.SaveCustomerRequest;
import com.jz.manage.moduls.service.DepartmentService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import io.swagger.annotations.ApiOperation;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.util.StringUtils;
import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
......@@ -46,16 +44,8 @@ public class DepartmentController extends BaseController {
*/
@PostMapping(value = "/findList")
@ApiOperation(value = "条件分页查询企业审核信息")
public PageInfoResponse<EnterpriseAuditDto> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception {
PageInfoResponse<EnterpriseAuditDto> pageInfo = new PageInfoResponse<>();
try {
pageInfo = departmentService.findList(auditRequest, req);
}catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
public Result<IPage<EnterpriseAuditDto>> findList(@RequestBody EnterpriseAuditRequest auditRequest, HttpServletRequest req) throws Exception {
return departmentService.findList(auditRequest, req);
}
/**
......@@ -66,27 +56,25 @@ public class DepartmentController extends BaseController {
*/
@GetMapping(value = "/getDepartment/{id}")
@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) {
CompanyDetailsDto companyDetails = departmentService.selectById(id);
return new Result<CompanyDetailsDto>(true, "查询企业详情成功!", StatusCode.OK, companyDetails);
return departmentService.selectById(id);
}
return new Result<CompanyDetailsDto>(false, "查询企业详情失败!", StatusCode.ERROR);
return Result.error("查询企业详情失败");
}
/**
* 企业审核接口
* @param id
* @param
* @return
*/
@PostMapping(value = "/audit/{id}")
@PostMapping(value = "/audit")
@ApiOperation(value = "企业审核")
public Result audit(@PathVariable(value = "id") Long id, HttpServletRequest req) throws Exception{
if (id != null) {
departmentService.audit(id, req);
return new Result<CompanyDetailsDto>(true, "企业审核成功!", StatusCode.OK);
public Result audit(@RequestBody DepartmentAuditReq req) throws Exception{
if (!StringUtils.isEmpty(req)) {
return departmentService.audit(req);
}
return new Result<CompanyDetailsDto>(false, "企业审核失败!", StatusCode.ERROR);
return Result.error("企业审核失败");
}
/**
......@@ -100,9 +88,8 @@ public class DepartmentController extends BaseController {
@ApiOperation(value = "添加用户")
public Result add(@RequestBody SaveCustomerRequest saveCustomerRequest, HttpServletRequest req) throws Exception {
if (saveCustomerRequest != null) {
Result result = departmentService.add(saveCustomerRequest, req);
return result;
return departmentService.add(saveCustomerRequest, req);
}
return new Result<CompanyDetailsDto>(false, "添加用户失败!", StatusCode.ERROR);
return Result.error("添加用户失败!");
}
}
\ No newline at end of file
......@@ -41,5 +41,12 @@ public class CompanyDetailsDto {
@ApiModelProperty(value = "开户行地址")
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;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
......@@ -12,6 +13,7 @@ import java.util.Date;
* @Date: 2020/12/10
* @Version:
*/
@Data
@ApiModel(value = "企业审核信息返回参数")
public class EnterpriseAuditDto {
......@@ -36,59 +38,6 @@ public class EnterpriseAuditDto {
@ApiModelProperty(value = "审核时间")
private Date auditTime;
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 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;
}
@ApiModelProperty(value = "企业角色")
private Long roleId;
}
package com.jz.manage.moduls.controller.customer.bean.request;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import 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;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.util.Date;
/**
* @ClassName:
......@@ -12,6 +15,7 @@ import io.swagger.annotations.ApiModelProperty;
* @Version:
*/
@ApiModel(value = "企业审核信息请求参数封装")
@Data
public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "企业地址")
......@@ -26,35 +30,12 @@ public class EnterpriseAuditRequest extends BasePageBean {
@ApiModelProperty(value = "审核状态")
private String auditStatus;
public String getRegisteredAddress() {
return registeredAddress;
}
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;
}
@ApiModelProperty(value = "搜索")
private String search;
public String getAuditStatus() {
return auditStatus;
}
@ApiModelProperty(value = "提交时间")
private String creTime;
public void setAuditStatus(String auditStatus) {
this.auditStatus = auditStatus;
}
@ApiModelProperty(value = "企业角色")
private Long roleId;
}
......@@ -6,6 +6,7 @@ import com.jz.common.bean.BasePageBean;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.math.BigDecimal;
......@@ -16,6 +17,7 @@ import java.math.BigDecimal;
* @Version:
*/
@ApiModel(value = "用户添加信息请求参数封装")
@Data
public class SaveCustomerRequest extends BasePageBean {
@ApiModelProperty(value = "企业id")
@TableId(value = "department_id",type = IdType.AUTO)
......@@ -57,108 +59,6 @@ public class SaveCustomerRequest extends BasePageBean {
@ApiModelProperty(value = "充值金额")
private BigDecimal balanceMoney;
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 getRegisteredAddress() {
return registeredAddress;
}
public void setRegisteredAddress(String registeredAddress) {
this.registeredAddress = registeredAddress;
}
public String getBusinessLicense() {
return businessLicense;
}
public void setBusinessLicense(String businessLicense) {
this.businessLicense = businessLicense;
}
public String getUnifiedCreditCode() {
return unifiedCreditCode;
}
public void setUnifiedCreditCode(String unifiedCreditCode) {
this.unifiedCreditCode = unifiedCreditCode;
}
public String getBankCardNumber() {
return bankCardNumber;
}
public void setBankCardNumber(String bankCardNumber) {
this.bankCardNumber = bankCardNumber;
}
public String getLinkman() {
return linkman;
}
public void setLinkman(String linkman) {
this.linkman = linkman;
}
public String getBankAddress() {
return bankAddress;
}
public void setBankAddress(String bankAddress) {
this.bankAddress = bankAddress;
}
public String getCustomerPhone() {
return customerPhone;
}
public void setCustomerPhone(String customerPhone) {
this.customerPhone = customerPhone;
}
public String getCustomerAccount() {
return customerAccount;
}
public void setCustomerAccount(String customerAccount) {
this.customerAccount = customerAccount;
}
public String getPassword() {
return password;
}
public void setPassword(String password) {
this.password = password;
}
public BigDecimal getBalanceMoney() {
return balanceMoney;
}
public void setBalanceMoney(BigDecimal balanceMoney) {
this.balanceMoney = balanceMoney;
}
public String getTelephone() {
return telephone;
}
public void setTelephone(String telephone) {
this.telephone = telephone;
}
@ApiModelProperty(value = "用户角色")
private String roleId;
}
package com.jz.manage.moduls.controller.finance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.finance.platForm.BalanceAuditRequest;
import com.jz.manage.moduls.controller.finance.platForm.BalanceInfoDto;
import com.jz.manage.moduls.controller.finance.platForm.BalanceListDto;
import com.jz.manage.moduls.controller.finance.platForm.BalanceListRequest;
import com.jz.manage.moduls.controller.finance.platForm.*;
import com.jz.manage.moduls.service.FinanceCustomerBalanceService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
......@@ -44,20 +43,12 @@ public class FinanceCustomerBalanceController extends BaseController {
*/
@PostMapping(value = "/cashOutList")
@ApiOperation(value = "充值管理--分页列表", notes = "分页列表")
public PageInfoResponse<BalanceListDto> getFinanceCashOutList(@RequestBody BalanceListRequest balanceListRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<BalanceListDto> pageInfo = new PageInfoResponse<BalanceListDto>();
Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
try {
pageInfo = financeCustomerBalanceService.findListBalance(balanceListRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
public Result<IPage<BalanceListDto>> getFinanceCashOutList(@RequestBody BalanceListRequest balanceListRequest, HttpServletRequest httpRequest) throws Exception {
IPage<BalanceListDto> pageInfo = financeCustomerBalanceService.findListBalance(balanceListRequest, httpRequest);
if (pageInfo.getSize() == 0) {
return Result.of_error("搜索失败!");
}
return pageInfo;
return Result.of_success(ResultMsg.SUCCESS, pageInfo);
}
/**
......@@ -101,4 +92,47 @@ public class FinanceCustomerBalanceController extends BaseController {
Result<Object> dto = financeCustomerBalanceService.uptBalanceInfoAuditByid(balanceAuditRequest);
return dto;
}
@PostMapping("/getAccountMoney")
@ApiOperation(value = "充值管理--快捷充值--保存充值金额", notes = "保存充值金额")
public Result getAccountMoney(@RequestBody BalanceQuickReq req){
if (StringUtils.isEmpty(req.getUnifiedCreditCode())) {
return Result.of_error("统一社会信用代码不能为空!");
}
if (StringUtils.isEmpty(req.getBalanceMoney())) {
return Result.of_error("充值金额不能为空!");
}
Result result = new Result();
try {
result = financeCustomerBalanceService.uptAccountMoney(req);
}catch (Exception e) {
e.printStackTrace();
}
return result;
}
@PostMapping("/addCashOutMoney")
@ApiOperation(value = "提现管理--快捷提现--保存提现金额", notes = "保存提现金额")
public Result addCashOutMoney(@RequestBody CashOutQuickReq req){
if (StringUtils.isEmpty(req.getUnifiedCreditCode())) {
return Result.of_error("统一社会信用代码不能为空!");
}
if (StringUtils.isEmpty(req.getCashOutMoney())) {
return Result.of_error("提现金额不能为空!");
}
Result result = new Result();
try {
result = financeCustomerBalanceService.addCashOutMoney(req);
}catch (Exception e) {
e.printStackTrace();
}
return result;
}
@PostMapping("/searchCompany")
@ApiOperation(value = "充值/提现管理-搜索企业", notes = "搜索企业")
public Result searchCompany(@RequestParam String search) {
Result result = financeCustomerBalanceService.searchCompany(search);
return result;
}
}
\ No newline at end of file
package com.jz.manage.moduls.controller.finance;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.service.FinanceTradeFlowService;
import io.swagger.annotations.Api;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
......@@ -21,4 +23,5 @@ public class FinanceTradeFlowController extends BaseController {
@Autowired
private FinanceTradeFlowService tFinanceTradeFlowService;
}
\ No newline at end of file
......@@ -2,8 +2,11 @@ package com.jz.manage.moduls.controller.finance;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.jz.common.bean.BasePageBean;
import com.jz.common.bean.MallCustomerApiDto;
import com.jz.common.bean.PageInfoResponse;
import com.jz.common.constant.Constants;
import com.jz.common.constant.RedisMessageConstant;
import com.jz.common.constant.ResultMsg;
import com.jz.common.utils.Result;
import com.jz.manage.moduls.controller.BaseController;
import com.jz.manage.moduls.controller.finance.platForm.*;
......@@ -50,15 +53,17 @@ public class PlatformTradeFlowInfoController extends BaseController {
Result<PlatFormMoneyAndDepartDto> result = new Result<>();
Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
PlatFormMoneyAndDepartDto dto = platformTradeFlowInfoService.queryPlatFormMoneyAndDepart(map);
result.setData(dto);
return result;
}
@PostMapping(value = "/getMoneyAndOrderTotalDto")
@ApiOperation(value = "财务管理---成交额和成交单数和平均成交额", notes = "成交额和成交单数和平均成交额")
public Result<MoneyAndOrderTotalDto> getMoneyAndOrderTotalDto(@RequestParam(required = false) String time, HttpServletRequest requset) throws Exception {
return platformTradeFlowInfoService.getMoneyAndOrderTotalDto(time);
}
/**
* 财务管理---我的订单
*
......@@ -68,12 +73,8 @@ public class PlatformTradeFlowInfoController extends BaseController {
*/
@PostMapping(value = "/orderCountList")
@ApiOperation(value = "财务管理---我的订单", notes = "我的订单")
public PageInfoResponse<OrderCountInfoDto> findList(@RequestBody BasePageBean pageBean, HttpServletRequest httpRequest) throws Exception {
public PageInfoResponse<OrderCountInfoDto> findList(@RequestBody OrderCountInfoReq pageBean, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<OrderCountInfoDto> pageInfo = new PageInfoResponse<OrderCountInfoDto>();
// Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
try {
pageInfo = platformTradeFlowInfoService.findListOrderCount(pageBean, httpRequest);
} catch (Exception e) {
......@@ -81,7 +82,6 @@ public class PlatformTradeFlowInfoController extends BaseController {
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}
return pageInfo;
}
......@@ -92,16 +92,16 @@ public class PlatformTradeFlowInfoController extends BaseController {
* @author Bellamy
* @since 2020-12-03
*/
@PostMapping(value = "/tradeDetilList")
@PostMapping(value = "/tradeDetailList")
@ApiOperation(value = "财务管理--交易明细", notes = "交易明细")
public PageInfoResponse<TradeDetilDto> getFinanceTradeDetil(@RequestBody TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception {
public PageInfoResponse<TradeDetilDto> getFinanceTradeDetail(@RequestBody TradeDetilRequest tradeDetilRequest, HttpServletRequest httpRequest) throws Exception {
PageInfoResponse<TradeDetilDto> pageInfo = new PageInfoResponse<TradeDetilDto>();
Map map = new HashMap();
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
try {
pageInfo = platformTradeFlowInfoService.findListFinanceTradeDetil(tradeDetilRequest, httpRequest);
pageInfo = platformTradeFlowInfoService.findListFinanceTradeDetail(tradeDetilRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
......@@ -120,20 +120,11 @@ public class PlatformTradeFlowInfoController extends BaseController {
@PostMapping(value = "/cashOutList")
@ApiOperation(value = "提现管理--分页列表", notes = "分页列表")
public Result<IPage<CashOutListDto>> getFinanceCashOutList(@RequestBody CashOutListRequest cashOutListRequest, HttpServletRequest httpRequest) throws Exception {
/*PageInfoResponse<CashOutListDto> pageInfo = new PageInfoResponse<CashOutListDto>();
Map map = new HashMap();*/
//从session中获取平台用户id
//SysUserDto user = (SysUserDto) SessionUtils.getUserCurrent(requset,"sysUser");
//map.put("userId", user.getUserId());
return Result.of_success(platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest));
/* try {
pageInfo = platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest);
} catch (Exception e) {
pageInfo.setMessage("查询失败");
pageInfo.setCode(Constants.FAILURE_CODE);
e.printStackTrace();
}*/
// return pageInfo;
IPage<CashOutListDto> listFinanceCashOut = platformTradeFlowInfoService.findListFinanceCashOut(cashOutListRequest, httpRequest);
if (listFinanceCashOut.getSize() == 0) {
return Result.of_error("搜索失败!");
}
return Result.of_success(ResultMsg.SUCCESS, listFinanceCashOut);
}
/**
......@@ -176,4 +167,5 @@ public class PlatformTradeFlowInfoController extends BaseController {
return dto;
}
}
\ No newline at end of file
......@@ -36,6 +36,17 @@ public class BalanceListRequest extends BasePageBean {
@ApiModelProperty(value = "充值时间")
private String balanceTime;
@ApiModelProperty(value = "搜索")
private String search;
public String getSearch() {
return search;
}
public void setSearch(String search) {
this.search = search;
}
public String getDepartmentName() {
return departmentName;
}
......
package com.jz.manage.moduls.controller.finance.platForm;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import java.io.Serializable;
/**
* @ClassName:
* @Author: Carl
* @Date: 2021/1/15
* @Version:
*/
@ApiModel(value = "快速充值--获取充值信息请求参数", description = "获取充值信息请求参数")
@Data
public class BalanceQuickReq implements Serializable {
@ApiModelProperty(value = "企业名称")
private String departmentName;
@ApiModelProperty(value = "联系人姓名")
private String linkman;
@ApiModelProperty(value = "联系人电话")
private String telephone;
@ApiModelProperty(value = "统一社会信用代码")
@NotNull(message = "统一社会信用代码不能为空!")
private String unifiedCreditCode;
@ApiModelProperty(value = "充值金额")
@NotNull(message = "充值金额不能为空!")
private String balanceMoney;
}
......@@ -37,14 +37,15 @@ public class CashOutListRequest extends BasePageBean {
private String casOutTime;
@ApiModelProperty(value = "企业名/提现描述")
private String key;
private String search;
public String getKey() {
return key;
public String getSearch() {
return search;
}
public void setKey(String key) {
this.key = key;
public void setSearch(String search) {
this.search = search;
}
public String getDepartmentName() {
......
......@@ -11,4 +11,10 @@ import com.jz.manage.moduls.entity.FinanceCashOut;
*/
public interface FinanceCashOutDao extends BaseMapper<FinanceCashOut> {
/**
* 快捷提现
* @param cashOut
* @return
*/
int addCashOut(FinanceCashOut cashOut);
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment