Merge remote-tracking branch 'origin/master'

master
river 4 years ago
commit 53b1597ded
  1. 47
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CrmsCompanyPersonalController.java
  2. 147
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/CrmsCompanyPersonalReq.java
  3. 6
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserServiceImpl.java

@ -2,6 +2,7 @@ package com.daqing.financial.crms.controller;
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.daqing.financial.crms.model.request.CrmsCompanyPersonalReq;
import com.daqing.financial.crms.service.ICrmsCompanyPersonalService; import com.daqing.financial.crms.service.ICrmsCompanyPersonalService;
import com.daqing.financial.crms.service.ICrmsCustomerRelatedService; import com.daqing.financial.crms.service.ICrmsCustomerRelatedService;
import com.daqing.framework.annotation.Log; import com.daqing.framework.annotation.Log;
@ -13,6 +14,7 @@ import com.daqing.framework.model.response.ResponseResult;
import com.daqing.framework.utils.PageUtils; import com.daqing.framework.utils.PageUtils;
import io.swagger.annotations.Api; import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation; import io.swagger.annotations.ApiOperation;
import org.springframework.beans.BeanUtils;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.annotation.Resource; import javax.annotation.Resource;
@ -58,17 +60,17 @@ public class CrmsCompanyPersonalController {
@Log(detail = "新增个人/企业关联人",level = 3,operationUnit = OperationUnit.COMPANY,operationType = OperationType.INSERT) @Log(detail = "新增个人/企业关联人",level = 3,operationUnit = OperationUnit.COMPANY,operationType = OperationType.INSERT)
@PostMapping("/insertCompanyPersonal") @PostMapping("/insertCompanyPersonal")
@ApiOperation(value = "新增个人/企业关联人") @ApiOperation(value = "新增个人/企业关联人")
public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonal crmsCompanyPersonal) { public ResponseResult insertCompanyPersonal(@RequestBody @Valid CrmsCompanyPersonalReq personal) {
// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
// String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); Date parse = null;
// Date parse = null; try {
// try { parse = sdf.parse(personal.getRegisteredTime());
// parse = sdf.parse(format); } catch (ParseException e) {
// } catch (ParseException e) { e.printStackTrace();
// e.printStackTrace(); }
// } CrmsCompanyPersonal crmsCompanyPersonal = new CrmsCompanyPersonal();
// BeanUtils.copyProperties(personal,crmsCompanyPersonal);
// crmsCompanyPersonal.setRegisteredTime(parse); crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal); boolean result = crmsCompanyPersonalService.save(crmsCompanyPersonal);
CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated(); CrmsCustomerRelated crmsCustomerRelated = new CrmsCustomerRelated();
crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id crmsCustomerRelated.setRelatedId(crmsCompanyPersonal.getId().intValue());//关联人Id
@ -87,22 +89,23 @@ public class CrmsCompanyPersonalController {
/** /**
* 编辑个人/企业关联人 * 编辑个人/企业关联人
* @param crmsCompanyPersonal * @param personal
* @return * @return
*/ */
@Log(detail = "编辑个人/企业关联人",level = 3,operationUnit = OperationUnit.COMPANY,operationType = OperationType.UPDATE) @Log(detail = "编辑个人/企业关联人",level = 3,operationUnit = OperationUnit.COMPANY,operationType = OperationType.UPDATE)
@PostMapping("/updateCompanyPersonal") @PostMapping("/updateCompanyPersonal")
@ApiOperation(value = "编辑个人/企业关联人") @ApiOperation(value = "编辑个人/企业关联人")
public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonal crmsCompanyPersonal){ public ResponseResult updateCompanyPersonal(@RequestBody CrmsCompanyPersonalReq personal){
// SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd"); SimpleDateFormat sdf =new SimpleDateFormat("yyyy-MM-dd");
// String format = sdf.format(crmsCompanyPersonal.getRegisteredTime()); Date parse = null;
// Date parse = null; try {
// try { parse = sdf.parse(personal.getRegisteredTime());
// parse = sdf.parse(format); } catch (ParseException e) {
// } catch (ParseException e) { e.printStackTrace();
// e.printStackTrace(); }
// } CrmsCompanyPersonal crmsCompanyPersonal = new CrmsCompanyPersonal();
// crmsCompanyPersonal.setRegisteredTime(parse); BeanUtils.copyProperties(personal,crmsCompanyPersonal);
crmsCompanyPersonal.setRegisteredTime(parse);
boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal); boolean result = crmsCompanyPersonalService.updateById(crmsCompanyPersonal);
return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL(); return result ? ResponseResult.SUCCESS(crmsCompanyPersonal) : ResponseResult.FAIL();
} }

@ -0,0 +1,147 @@
package com.daqing.financial.crms.model.request;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import java.io.Serializable;
import java.util.Date;
/**
* <p>
* 关联人/关联企业
* </p>
*
* @author Qyq
* @since 2020-11-13
*/
@Data
public class CrmsCompanyPersonalReq implements Serializable {
private static final long serialVersionUID = 1L;
/**
* 主键
*/
@ApiModelProperty(value = "主键")
@TableId(value = "id", type = IdType.AUTO)
private Long id;
/**
* 关联人名称
*/
@ApiModelProperty(value = "关联人名称")
private String relatedName;
/**
* 联系地址
*/
@ApiModelProperty(value = "联系地址")
private String address;
/**
* 社会统一代码
*/
@ApiModelProperty(value = "社会统一代码")
private String socialUnifiedCode;
/**
* 注册资金
*/
@ApiModelProperty(value = "注册资金(元)")
private String registeredCapital;
/**
* 注册时间
*/
@ApiModelProperty(value = "注册时间")
@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8")
private String registeredTime;
/**
* 所属行业
*/
@ApiModelProperty(value = "所属行业")
private String industry;
/**
* 法人姓名
*/
@ApiModelProperty(value = "法人姓名")
private String legalPersonName;
/**
* 联系电话
*/
@ApiModelProperty(value = "联系电话")
private String phone;
/**
* 关联关系
*/
@ApiModelProperty(value = "关联关系")
private String relationship;
/**
* 股东情况
*/
@ApiModelProperty(value = "股东情况")
private String shareholdersSituation;
/**
* 婚姻状况,0:未婚,1:已婚,2:离异,3:再婚
*/
@ApiModelProperty(value = "婚姻状况,0:未婚,1:已婚,2:离异,3:再婚")
private Integer maritalStatus;
/**
* 身份证号
*/
@ApiModelProperty(value = "身份证号")
private String idCard;
/**
* 年龄
*/
@ApiModelProperty(value = "年龄")
private Integer age;
/**
* 性别10
*/
@ApiModelProperty(value = "性别:1、男,0、女")
private Integer gender;
/**
* 学历,0:本科,1:大专,2:高职,3:中专,4:其他
*/
@ApiModelProperty(value = "学历,0:本科,1:大专,2:高职,3:中专,4:其他")
private Integer education;
/**
* 工作单位
*/
@ApiModelProperty(value = "工作单位")
private String employer;
/**
* 职务
*/
@ApiModelProperty(value = "职务")
private String position;
/**
* 关联人类型
*/
@ApiModelProperty(value = "关联人类型")
private String type;
/**
* 企业id
*/
@ApiModelProperty(value = "企业id")
private Integer relatedCompanyId;
}

@ -87,12 +87,6 @@ public class UserServiceImpl extends ServiceImpl<UserLoginDao, UserEntity> imple
userInfo.getCurrentUserInfo().setToken(data.getToken()); userInfo.getCurrentUserInfo().setToken(data.getToken());
new UsernamePasswordAuthenticationToken(userInfo, null, userInfo.getAuthorities());*/ new UsernamePasswordAuthenticationToken(userInfo, null, userInfo.getAuthorities());*/
return dbUser; return dbUser;
}else if(dbUser.getPhoneAccount()==null){
try {
response.sendRedirect("https://www.huorantech.cn/index");
} catch (IOException e) {
e.printStackTrace();
}
} }
if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口 if(dbUser == null){//openId不存在,返回绑定手机号页面,须另写绑定手机号接口

Loading…
Cancel
Save