Commit 93dbab6b by kangxiaoshan

大后台更新

parent 3f152851
......@@ -104,7 +104,7 @@
<office.username>root</office.username>
<office.password>reyun.123</office.password>
<tkio.url>jdbc:mysql://10.3.20.32:3306/trackingio_test?characterEncoding=utf-8</tkio.url>
<tkio.url>jdbc:mysql://10.3.20.32:3306/trackingio_trans?characterEncoding=utf-8</tkio.url>
<tkio.username>root</tkio.username>
<tkio.password>reyun.123</tkio.password>
......
......@@ -63,9 +63,15 @@ public class Contract {
private String customerThird;// 三方客户
private int tradeType; // 行业id
private Long relationContract;// 关联合同id
private String createrName; // 录入人
private String relationCode;// 关联合同编号
private String hasDiscount;// 是否有优惠
@Id
@GeneratedValue
public Long getId() {
......@@ -314,6 +320,24 @@ public class Contract {
return priceLevelName;
}
@Transient
public String getRelationCode() {
return relationCode;
}
public void setRelationCode(String relationCode) {
this.relationCode = relationCode;
}
@Transient
public String getHasDiscount() {
return hasDiscount;
}
public void setHasDiscount(String hasDiscount) {
this.hasDiscount = hasDiscount;
}
public void setPriceLevelName(String priceLevelName) {
this.priceLevelName = priceLevelName;
}
......
......@@ -12,6 +12,6 @@ import java.util.List;
*/
public interface ContractRelationRepository extends JpaRepository<ContractRelation, Long> {
@Query(value = "select relation_id from contract_relation where main_contract = ?1",nativeQuery = true)
@Query(value = "select main_contract from contract_relation where relation_id = ?1",nativeQuery = true)
List<Long> findRelationIds(String contractId);
}
......@@ -8,8 +8,12 @@ public enum ContractStatusEnum {
WAIT("wait","未执行"),
EXECUTING("executing", "执行中"),
CANCEL("cancel", "作废"),
END("end", "已结束"),
MONEY_BACK_ALL("backall","已回款"),
MONEY_BACK_NONE("backnone","未回款"),
MONEY_BACK_PART("backpart","部分回款"),
CANCEL("cancel", "作废"),
DELETE("del", "已删除");
private String key;
......
......@@ -53,8 +53,8 @@ public class AuthorizationInterceptor extends HandlerInterceptorAdapter {
System.out.println("-----"+requestURL.contains("findSaleInfo"));
return true;
}
System.out.println("============="+requestURL);
System.out.println(requestURL.indexOf("accountmng/findSaleInfo"));
// System.out.println("============="+requestURL);
// System.out.println(requestURL.indexOf("accountmng/findSaleInfo"));
if (requestURL.indexOf("login/login") != -1
|| requestURL.indexOf("update/pwd") != -1
|| requestURL.indexOf("user/forget") != -1
......
......@@ -4,10 +4,15 @@ import org.springframework.data.jpa.repository.JpaRepository;
import org.springframework.data.jpa.repository.Query;
import tkio.model.PackageType;
import java.util.List;
public interface PackageTypeRepository extends JpaRepository<PackageType, Long> {
@Query(value = "select * from package_type where id=(select pricelevel from account where id=?1)", nativeQuery = true)
PackageType findPackageTypeByRootParent(Long rootParent);
@Query(value = "select * from package_type where id=?1", nativeQuery = true)
PackageType findPackageTypeByID(Long ID);
@Query(value = " select * from package_type where is_new is true ", nativeQuery = true)
List<PackageType> findIsNewAll();
}
......@@ -73,6 +73,8 @@ public class AccountServiceImpl implements AccountService {
@Override
public Account forbiden(Contract contract) {
// 注释功能
if(true) return null;
Account account = accountRepository.findByEmail(contract.getEmail());
account.setStatus(0);
return accountRepository.save(account);
......
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