小程序端申请记录优化、申请额度优化、更新员工图像(小程序端)

master
river 4 years ago
parent 2aeb151e48
commit b8be35958c
  1. 3
      dq-financial-api/src/main/java/com/daqing/financial/hrms/UserControllerApi.java
  2. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/controller/CustomerAppletController.java
  3. 3
      dq-financial-crms/src/main/java/com/daqing/financial/crms/model/request/PersonalAppletRequest.java
  4. 11
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerAppletServiceImpl.java
  5. 86
      dq-financial-crms/src/main/resources/bootstrap.properties
  6. 7
      dq-financial-crms/src/main/resources/mapper/crms/CustomerAppletDao.xml
  7. 2
      dq-financial-crms/src/main/resources/mapper/crms/PersonalCustomerDao.xml
  8. 12
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/controller/UserController.java
  9. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/dao/UserDao.java
  10. 2
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/UserService.java
  11. 14
      dq-financial-hrms/src/main/java/com/daqing/financial/hrms/service/impl/UserServiceImpl.java
  12. 4
      dq-financial-hrms/src/main/resources/mapper/hrms/UserDao.xml
  13. 1
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/response/HrmsCode.java

@ -36,7 +36,4 @@ public interface UserControllerApi {
@ApiOperation(value = "图像文件上传",notes = "图像文件上传")
ResponseResult uploadFile(MultipartFile file);
@ApiOperation(value = "更新员工图像(小程序端)", notes = "更新员工图像(小程序端)")
ResponseResult updateHeadPortraitUrl(String headPortraitUrl);
}

@ -102,8 +102,7 @@ public class CustomerAppletController {
*/
@GetMapping("/get/record")
@ApiOperation(value = "获取申请记录", response = ApplicationRecordResponse.class)
public ResponseResult getApplicationRecord(@RequestParam("page") Integer page,
@RequestParam("size") Integer size, Integer type, Integer status) {
public ResponseResult getApplicationRecord(@RequestParam("page") Integer page, @RequestParam("size") Integer size, Integer type, Integer status) {
return ResponseResult.SUCCESS(customerAppletService.getApplicationRecord(page, size, type, status));
}

@ -20,9 +20,6 @@ import java.io.Serializable;
@ToString
public class PersonalAppletRequest implements Serializable {
@ApiModelProperty("客户表id")
private Long companyId;
@NotNull(message = "客户名称不能为空")
@ApiModelProperty(value = "客户名称")
private String name;

@ -203,7 +203,6 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
PersonalCustomerEntity personalCustomerEntity = personalCustomerDao.queryPersonalCustomerById((long) customerId);
BeanUtils.copyProperties(customer, personalAppletRequest);
BeanUtils.copyProperties(personalCustomerEntity, personalAppletRequest);
personalAppletRequest.setCompanyId(personalCustomerEntity.getId());
return personalAppletRequest;
}
if (type == 1) {
@ -212,13 +211,12 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
.eq("customer_id", (long) customerId));
BeanUtils.copyProperties(customer, companyAppletRequest);
BeanUtils.copyProperties(companyCustomerEntity, companyAppletRequest);
/*if (companyAppletRequest.getIsExistRelated() == 1) {
if (companyAppletRequest.getIsExistRelated() == 1) {
Integer companyId = this.getBaseMapper().getCompanyId(customerId);
if (companyId != null) {
companyAppletRequest.setCustomerId(companyId);
}
}*/
companyAppletRequest.setCustomerId(this.getBaseMapper().getCompanyId(customerId));
}
return companyAppletRequest;
}
return null;
@ -378,11 +376,8 @@ public class CustomerAppletServiceImpl extends ServiceImpl<CustomerAppletDao, Cu
Integer companyId = this.getBaseMapper().getCompanyId(customerId);
// 查询申请记录信息
List<ApplicationRecordPO> applicationRecordPOList = this.getBaseMapper().getApplyMount(companyId);
if (applicationRecordPOList.size() < 1) {
return map;
}
for (ApplicationRecordPO applicationRecordPO : applicationRecordPOList) {
company += applicationRecordPO.getApplyAmount() == null ? 0.00 : applicationRecordPO.getApplyAmount();
company += applicationRecordPO.getApplyAmount();
}
map.put("company", company);
}

@ -1,24 +1,24 @@
#服务名称
#spring.application.name=dq-financial-crms
##配置中心地址
#spring.cloud.nacos.config.server-addr=192.168.31.140:8848
#spring.cloud.nacos.config.file-extension=yml
##redis配置
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0
spring.application.name=dq-financial-crms
#配置中心地址
spring.cloud.nacos.config.server-addr=192.168.31.140:8848
spring.cloud.nacos.config.file-extension=yml
#redis配置
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#本地测试环境
#spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
spring.cloud.nacos.config.namespace=1520c5ea-5f15-4ac1-9eb1-d25924825b99
#线上测试环境
#spring.cloud.nacos.config.namespace=5698e60a-9d0b-433f-a69f-12b0a2d23128
#
#线上生产环境
#spring.cloud.nacos.config.namespace=6054a175-069a-492d-8679-820758416406
@ -29,30 +29,30 @@ ribbon.ConnectTimeout: 120000
# 正式环境(prod)
#服务名称
spring.application.name=dq-financial-crms
##配置中心地址
spring.cloud.nacos.config.server-addr=120.78.127.12:8848
spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
#spring.cloud.nacos.config.group=prod
spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
spring.cloud.nacos.config.ext-config[0].group=prod
spring.cloud.nacos.config.ext-config[0].refresh=true
spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
spring.cloud.nacos.config.ext-config[1].group=prod
spring.cloud.nacos.config.ext-config[1].refresh=true
spring.cloud.nacos.config.ext-config[2].data-id=other.yml
spring.cloud.nacos.config.ext-config[2].group=prod
spring.cloud.nacos.config.ext-config[2].refresh=true
spring.redis.host=127.0.0.1
spring.redis.port=6379
spring.redis.password=dq123456
spring.redis.database=0
spring.redis.timeout=30000
spring.redis.jedis.pool.max-active=8
spring.redis.jedis.pool.max-wait=-1
spring.redis.jedis.pool.max-idle=8
spring.redis.jedis.pool.min-idle=0
#spring.application.name=dq-financial-crms
###配置中心地址
#spring.cloud.nacos.config.server-addr=120.78.127.12:8848
#spring.cloud.nacos.config.namespace=25ce05e2-a0eb-4842-92e4-d8b550a489dd
##spring.cloud.nacos.config.group=prod
#
#spring.cloud.nacos.config.ext-config[0].data-id=datasource.yml
#spring.cloud.nacos.config.ext-config[0].group=prod
#spring.cloud.nacos.config.ext-config[0].refresh=true
#
#spring.cloud.nacos.config.ext-config[1].data-id=mybatis.yml
#spring.cloud.nacos.config.ext-config[1].group=prod
#spring.cloud.nacos.config.ext-config[1].refresh=true
#
#spring.cloud.nacos.config.ext-config[2].data-id=other.yml
#spring.cloud.nacos.config.ext-config[2].group=prod
#spring.cloud.nacos.config.ext-config[2].refresh=true
#
#spring.redis.host=127.0.0.1
#spring.redis.port=6379
#spring.redis.password=dq123456
#spring.redis.database=0
#spring.redis.timeout=30000
#spring.redis.jedis.pool.max-active=8
#spring.redis.jedis.pool.max-wait=-1
#spring.redis.jedis.pool.max-idle=8
#spring.redis.jedis.pool.min-idle=0

@ -29,7 +29,7 @@
<!-- 申请记录 -->
<select id="getApplicationRecord" resultType="com.daqing.framework.domain.crms.ext.ApplicationRecordPO">
SELECT l.id AS id,a.create_time AS apply_date,a.amount_wide AS amount_wide,a.apply_time AS apply_time,l.status AS audit_status,
SELECT a.id AS id,a.create_time AS apply_date,a.amount_wide AS amount_wide,a.apply_time AS apply_time,l.status AS audit_status,
a.apply_amount AS apply_amount,b.business_status AS business_status
FROM dg_apply_amount_info AS a
LEFT JOIN dg_business_process_status AS b
@ -46,7 +46,7 @@
<if test="status == 1 or status == 2 or status == 3 or status == 4 or status == 5">
AND l.status = #{status}
</if>
AND l.role_id = 58
GROUP BY a.id
</select>
<!-- 获取已申请额度 -->
@ -69,7 +69,8 @@
FROM dg_apply_amount_list AS l
LEFT JOIN dg_business_process_status AS b
ON l.business_id = b.business_id
WHERE l.id = #{id}
WHERE l.role_id = 58
AND l.business_id = #{id}
</select>
</mapper>

@ -26,7 +26,7 @@
<!-- 根据客户基本信息id查询个人类型客户的信息 -->
<select id="queryPersonalCustomerById" parameterType="long" resultType="com.daqing.framework.domain.crms.PersonalCustomerEntity">
SELECT id,id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,
SELECT id_card,age,gender,marital_status,education,employer,position,working_years,social_security_num,
living_situation,residence_addr,business_source,emergency_linkman,emergency_linkman_relationship,
emergency_linkman_phone
FROM crms_personal_customer

@ -118,18 +118,6 @@ public class UserController implements UserControllerApi {
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 更新员工图像(小程序端)
* @param headPortraitUrl 图像路径
*/
@GetMapping("/update/url")
public ResponseResult updateHeadPortraitUrl(@RequestParam("headPortraitUrl") String headPortraitUrl){
Boolean result = userService.updateHeadPortraitUrl(headPortraitUrl);
return result ? ResponseResult.SUCCESS() : ResponseResult.FAIL();
}
/**
* 只有当访问用户具有 ROLE_ADMIN 权限时才能访问否则返回 401 未授权
* 通过 Authentication 参数或者 SecurityContextHolder.getContext().getAuthentication() 可以拿到授权信息进行查看

@ -32,6 +32,4 @@ public interface UserDao extends BaseMapper<UserEntity> {
Long getEmployeeIdByUserId(Long userId);
List<String> listPhoneAccount();
Boolean updateHeadPortraitUrl(@Param("id") Long employee_id, @Param("url") String headPortraitUrl);
}

@ -28,7 +28,5 @@ public interface UserService extends IService<UserEntity> {
Boolean bindingPhoneAccount(String phone,String code);
Boolean cancel();
Boolean updateHeadPortraitUrl(String headPortraitUrl);
}

@ -14,7 +14,6 @@ import com.daqing.framework.util.Md5Util;
import com.daqing.framework.util.RedisUtil;
import com.daqing.framework.util.SendSMS;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.lang.StringUtils;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
@ -245,19 +244,6 @@ public class UserServiceImpl extends ServiceImpl<UserDao, UserEntity> implements
return this.getBaseMapper().updateWeChat(Long.parseLong(userId), null);
}
/**
* 更新图像(小程序端)
* @param headPortraitUrl 图像路径
*/
@Override
public Boolean updateHeadPortraitUrl(String headPortraitUrl) {
if (StringUtils.isEmpty(headPortraitUrl) || headPortraitUrl.trim().length() == 0) {
ExceptionCast.cast(HrmsCode.USER_HEAD_PORTRAIT_URL_IS_NULL);
}
String userId = this.getUserId();
return this.getBaseMapper().updateHeadPortraitUrl(this.getBaseMapper().getEmployeeIdByUserId(Long.parseLong(userId)), headPortraitUrl);
}
/**
* 获取当前登录用户信息
*/

@ -59,8 +59,4 @@
SELECT phone_account FROM hrms_user WHERE del_or_not = 0
</select>
<!-- 更新员工表的图像 -->
<update id="updateHeadPortraitUrl">
UPDATE hrms_employee SET head_portarit_url = #{url} WHERE id = #{id}
</update>
</mapper>

@ -61,7 +61,6 @@ public enum HrmsCode implements ResultCode {
USER_FILE_TYPE_MISTAKE(false,88013,"文件格式不正确,请重新选择图片文件!"),
USER_FILE_UPLOAD_FAIL(false,88014,"上传图像失败,请稍后刷新再试!"),
USER_PHONE_ACCOUNT_REPETITION(false,88015,"该手机号已绑定过用户,请更换手机号!"),
USER_HEAD_PORTRAIT_URL_IS_NULL(false, 88016, "当前图片不存在,请重新选择!"),
PHNOE_ACCOUNT_NOT_EMPTY(false,33001,"手机号码为空!"),
VERIFY_CODE_NOT_EMPTY(false,33002,"短信验证码为空!"),

Loading…
Cancel
Save