update
This commit is contained in:
@@ -36,42 +36,32 @@ public class BssVatInvoice implements Serializable {
|
||||
private Long id;
|
||||
// 发票代码
|
||||
@Column(name = "invoice_code")
|
||||
@NotEmpty(message = "发票代码不能为空")
|
||||
private String invoiceCode;
|
||||
// 发票号码
|
||||
@Column(name = "invoice_no")
|
||||
@NotEmpty(message = "发票号码不能为空")
|
||||
private String invoiceNo;
|
||||
// 发票日期
|
||||
@Column(name = "invoice_date")
|
||||
@NotEmpty(message = "发票日期不能为空")
|
||||
@Pattern(regexp = "[0-9]{4}-[0-9]{2}-[0-9]{2}", message = "日期格式不正确")
|
||||
private String invoiceDate;
|
||||
// 校验码
|
||||
@Column(name = "check_code")
|
||||
@NotEmpty(message = "校验码不能为空")
|
||||
private String checkCode;
|
||||
// 发票金额
|
||||
@Column(name = "invoice_money")
|
||||
@NotNull(message = "发票金额不能为空")
|
||||
private BigDecimal invoiceMoney;
|
||||
// 税额
|
||||
@Column(name = "tax_amount")
|
||||
@NotNull(message = "税额不能为空")
|
||||
private BigDecimal taxAmount;
|
||||
// 总金额
|
||||
@Column(name = "total_amount")
|
||||
@NotNull(message = "总金额不能为空")
|
||||
private BigDecimal totalAmount;
|
||||
// 总金额(大写)
|
||||
@Column(name = "total_amount_cn")
|
||||
@NotEmpty(message = "总金额(大写)不能为空")
|
||||
private String totalAmountCn;
|
||||
|
||||
//发票类型
|
||||
//增值税普通发票 0; 增值税专用发票 1
|
||||
@Column(name = "invoice_type")
|
||||
@NotNull(message = "发票类型不能为空")
|
||||
private Integer invoiceType;
|
||||
|
||||
// 备注
|
||||
|
||||
+14
@@ -1,8 +1,14 @@
|
||||
package com.cwhelp.modules.business.repository;
|
||||
|
||||
import com.cwhelp.common.constant.StatusConst;
|
||||
import com.cwhelp.modules.business.domain.BssEmployee;
|
||||
import com.cwhelp.modules.system.repository.BaseRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Modifying;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
|
||||
/**
|
||||
@@ -10,4 +16,12 @@ import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
* @date 2019/07/31
|
||||
*/
|
||||
public interface BssEmployeeRepository extends BaseRepository<BssEmployee, Long>, JpaSpecificationExecutor<BssEmployee> {
|
||||
|
||||
BssEmployee findByPhoneNum(String telephone);
|
||||
|
||||
@Modifying
|
||||
@Transactional
|
||||
@Query("update bss_employee set pwd = ?1 where id = ?2 and status <> " + StatusConst.DELETE )
|
||||
void update(String pwd, int id);
|
||||
|
||||
}
|
||||
@@ -1,5 +1,6 @@
|
||||
package com.cwhelp.modules.system.service;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssEmployee;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
|
||||
/**
|
||||
@@ -8,4 +9,8 @@ import com.cwhelp.modules.system.domain.User;
|
||||
public interface ApiUserService {
|
||||
|
||||
User checkLoginPremission(String telephone);
|
||||
|
||||
BssEmployee getUserByPhoneNum(String telephone);
|
||||
|
||||
void save(BssEmployee user);
|
||||
}
|
||||
|
||||
+13
@@ -1,5 +1,7 @@
|
||||
package com.cwhelp.modules.system.service.impl;
|
||||
|
||||
import com.cwhelp.modules.business.domain.BssEmployee;
|
||||
import com.cwhelp.modules.business.repository.BssEmployeeRepository;
|
||||
import com.cwhelp.modules.system.domain.User;
|
||||
import com.cwhelp.modules.system.repository.UserRepository;
|
||||
import com.cwhelp.modules.system.service.ApiUserService;
|
||||
@@ -16,10 +18,21 @@ public class ApiUserServiceImpl implements ApiUserService {
|
||||
@Autowired
|
||||
private UserRepository userRepository;
|
||||
|
||||
@Autowired
|
||||
private BssEmployeeRepository bssEmployeeRepository;
|
||||
|
||||
@Override
|
||||
public User checkLoginPremission(String telephone) {
|
||||
return userRepository.findByPhone(telephone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public BssEmployee getUserByPhoneNum(String telephone) {
|
||||
return bssEmployeeRepository.findByPhoneNum(telephone);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void save(BssEmployee user) {
|
||||
// bssEmployeeRepository.update(user.getPwd, user.getId());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user