Commit c91baf41 authored by hezhuozhi's avatar hezhuozhi

Merge remote-tracking branch 'origin/developer' into developer

parents aff995c7 f20f68ae
......@@ -65,7 +65,7 @@ public class IcbcEnum {
@Getter
@NoArgsConstructor
@AllArgsConstructor
enum ProtocolStatus {
public static enum ProtocolStatus {
NOT_EFFECTIVE("未生效", "0"),
......@@ -86,5 +86,17 @@ public class IcbcEnum {
*/
private String code;
public static String getNameByCode(String code, String defaultName) {
for (ProtocolStatus state : ProtocolStatus.values()) {
if (state.getCode().equals(code)) {
return state.getName();
}
}
if (StringUtils.isNotEmpty(defaultName)) {
return defaultName;
}
return null;
}
}
}
......@@ -32,10 +32,10 @@ public class HygfIcbcRecordQueryDTO {
private String phone;
@ApiModelProperty (value = "区域公司")
private String regionalCompaniesSeq;
private String regionalCompaniesName;
@ApiModelProperty (value = "所属地址")
private String address;
private String addressName;
private Integer current;
......
......@@ -10,7 +10,8 @@
</sql>
<select id="listObjectCount" resultType="integer">
SELECT count(1)
SELECT
count( DISTINCT ph.amos_user_id )
FROM
hygf_peasant_household ph LEFT JOIN hygf_icbc_record icbc ON ph.amos_user_id = icbc.amos_user_id
<where>
......@@ -28,21 +29,22 @@
<if test="param.phone != null and param.phone != ''">
AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.regionalCompaniesSeq != null and param.regionalCompaniesSeq != ''">
AND ph.regional_companies_seq = #{param.regionalCompaniesSeq}
<if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">
AND ph.regional_companies_name LIKE CONCAT('%', #{param.regionalCompaniesName}, '%')
</if>
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
</if>
</where>
GROUP BY
ph.amos_user_id
</select>
<select id="listObject" resultType="com.yeejoin.amos.boot.module.hygf.api.dto.HygfIcbcRecordDTO">
SELECT DISTINCT
icbc.sequence_nbr,
ph.owners_name as custName,
ph.telephone as phone,
ph.id_card,
ifnull(icbc.cust_name, ph.owners_name) as custName,
ifnull(icbc.phone, ph.telephone) as phone,
ifnull(icbc.id_card, ph.id_card) as idCard,
ph.amos_user_id,
icbc.open_account_status,
icbc.protocol_status
......@@ -63,8 +65,11 @@
<if test="param.phone != null and param.phone != ''">
AND ph.telephone LIKE CONCAT('%', #{param.phone}, '%')
</if>
<if test="param.regionalCompaniesSeq != null and param.regionalCompaniesSeq != ''">
AND ph.regional_companies_seq = #{param.regionalCompaniesSeq}
<if test="param.regionalCompaniesName != null and param.regionalCompaniesName != ''">
AND ph.regional_companies_name LIKE CONCAT('%', #{param.regionalCompaniesName}, '%')
</if>
<if test="param.addressName != null and param.addressName != ''">
AND ph.project_address LIKE CONCAT('%', #{param.addressName}, '%')
</if>
</if>
</where>
......
......@@ -85,14 +85,14 @@ public class HygfIcbcController extends BaseController {
return hygfIcbcService.registerWalletCallback(request, response);
}
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false)
@GetMapping (value = "/{sequenceNbr}")
@ApiOperation (httpMethod = "GET", value = "根据sequenceNbr查询注册电子钱包", notes = "注册电子钱包")
public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String sequenceNbr) {
return ResponseHelper.buildResponse(hygfIcbcService.getObject(Long.valueOf(sequenceNbr)));
@TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/{userId}")
@ApiOperation (httpMethod = "GET", value = "根据农户userId查询注册电子钱包", notes = "注册电子钱包")
public ResponseModel<HygfIcbcRecordDTO> getObject(@PathVariable String userId) {
return ResponseHelper.buildResponse(hygfIcbcService.getObject(userId));
}
@TycloudOperation (ApiLevel = UserType.AGENCY, needAuth = false)
@TycloudOperation (ApiLevel = UserType.AGENCY)
@GetMapping (value = "/list")
@ApiOperation (httpMethod = "GET", value = "聚富通电子钱包列表查询", notes = "聚富通电子钱包列表查询")
@UserLimits
......
......@@ -248,4 +248,4 @@ spring.elasticsearch.rest.password=123456
spring.elasticsearch.rest.read-timeout=30000
## 聚富通 配置
hygf.icbc.callbackUrl=http://47.92.234.253:8088/hygf/icbc/notify
\ No newline at end of file
hygf.icbc.callbackUrl=https://yth.yunqingtech.com/hygf/icbc/notify
\ No newline at end of file
......@@ -160,7 +160,7 @@
</if>
</where>
ORDER BY
log.CREATE_DATE DESC
log.REC_DATE DESC
LIMIT #{start}, #{size}
</select>
......
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