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