@@ -50,9 +50,8 @@ public class IssueOrderAddress extends StringPropertyUUIDEntity { | |||
@Column(name = "POSTAL_CODE") | |||
private String postalCode;//邮政编码 | |||
@NotNull | |||
@Digits(integer=0,fraction=-127) | |||
@Column(name = "DEFAULT_ADDRESS") | |||
private BigDecimal defaultAddress;//是否为默认地址 | |||
private Integer defaultAddress;//是否为默认地址 | |||
@NotBlank | |||
@Column(name = "STATUS") | |||
private Integer status;//状态 0-删除 1-正常 |
@@ -2,7 +2,13 @@ package cn.com.taiji.core.repo.jpa.issue; | |||
import cn.com.taiji.common.repo.jpa.AbstractJpaRepo; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import org.springframework.data.jpa.repository.Query; | |||
import java.util.List; | |||
public interface IssueOrderAddressRepo extends AbstractJpaRepo<IssueOrderAddress, String>{ | |||
@Query("from IssueOrderAddress where openId=?1 and defaultAddress = ?2 and status=?3") | |||
public List<IssueOrderAddress> listDefault(String openId, Integer defaultAddress, Integer status); | |||
} |
@@ -5,6 +5,8 @@ import cn.com.taiji.core.entity.dict.basic.AccountType; | |||
import cn.com.taiji.core.entity.user.AccountInfo; | |||
import org.springframework.data.jpa.repository.Query; | |||
import java.util.List; | |||
public interface AccountInfoRepo extends AbstractJpaRepo<AccountInfo, String> { | |||
@@ -13,4 +15,9 @@ public interface AccountInfoRepo extends AbstractJpaRepo<AccountInfo, String> { | |||
AccountInfo findByIdNumAndAccountType(String idNum, AccountType accountType); | |||
@Query("FROM AccountInfo WHERE mobile=?1 ") | |||
List<AccountInfo> findAllByMobile(String mobile); | |||
@Query("FROM AccountInfo WHERE account=?1") | |||
AccountInfo findByAccount(String account); | |||
} |
@@ -0,0 +1,75 @@ | |||
package cn.com.taiji.iaw.api.comm; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.common.web.ApiResponse; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import cn.com.taiji.iaw.api.MyValidController; | |||
import cn.com.taiji.iaw.dto.comm.*; | |||
import cn.com.taiji.iaw.manager.comm.AddressManager; | |||
import io.swagger.annotations.Api; | |||
import io.swagger.annotations.ApiOperation; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.web.bind.annotation.PostMapping; | |||
import org.springframework.web.bind.annotation.RequestBody; | |||
import org.springframework.web.bind.annotation.RequestMapping; | |||
import org.springframework.web.bind.annotation.RestController; | |||
import javax.validation.Valid; | |||
@Api(tags = {"收货地址管理"}) | |||
@RestController | |||
@RequestMapping("/api/address") | |||
public class AddressController extends MyValidController { | |||
@Autowired | |||
private AddressManager manager; | |||
@ApiOperation("地址列表查询") | |||
@PostMapping("/query") | |||
public ApiResponse<Pagination> query(@Valid @RequestBody AddressQueryRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.page(dto)); | |||
} | |||
@ApiOperation("地址查询") | |||
@PostMapping("/findById") | |||
public ApiResponse<IssueOrderAddress> findById(@Valid @RequestBody AddressInfoRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.findById(dto)); | |||
} | |||
@ApiOperation("地址添加、修改") | |||
@PostMapping("/add") | |||
public ApiResponse<IssueOrderAddress> add(@Valid @RequestBody AddressAddRequestDTO dto) throws ManagerException { | |||
return ApiResponse.of(manager.add(dto)); | |||
} | |||
@ApiOperation("地址删除") | |||
@PostMapping("/delete") | |||
public ApiResponse delete(@Valid @RequestBody AddressInfoRequestDTO dto) throws ManagerException { | |||
manager.delete(dto); | |||
return ApiResponse.success().setMessage("刪除成功"); | |||
} | |||
// @ApiOperation("文本信息查询") | |||
// @PostMapping("/textQuery") | |||
// public ApiResponse<PromptTextQueryResponseDTO> textQuery(@RequestBody PromptTextQueryRequestDTO dto) throws ManagerException { | |||
// PromptTextQueryResponseDTO response = manager.textQuery(dto); | |||
// return ApiResponse.of(response); | |||
// } | |||
// @ApiOperation("MTS-轮播图查询所有启用信息") | |||
// @PostMapping("/swiperqueryall")//59b1aab2864a467fb55f028aa54b224a | |||
// public ApiResponse<SwiperQueryAllResponseDTO> swiperqueryall(@RequestBody SwiperQueryAllRequestDTO dto) throws ManagerException { | |||
// SwiperQueryAllResponseDTO response = manager.swiperqueryall(dto); | |||
// return ApiResponse.of(response); | |||
// } | |||
// @ApiOperation("高速快讯分页查询") | |||
// @PostMapping("/highspeednewsflashqiery")//64f4a17302774b6eab09f7a1f8364605 | |||
// public ApiResponse<Pagination> highspeednewsflashqiery(@RequestBody HighSpeedNewsFlashRequestDTO dto) throws ManagerException { | |||
// Pagination response = manager.highspeednewsflashqiery(dto); | |||
// return ApiResponse.of(response); | |||
// } | |||
} |
@@ -0,0 +1,46 @@ | |||
package cn.com.taiji.iaw.dto.comm; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.iaw.dto.AbstractBizRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotBlank; | |||
import javax.validation.constraints.NotNull; | |||
@ApiModel(description = "地址添加修改请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AddressAddRequestDTO extends AbstractBizRequestDTO { | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
/*** 新增时传值。编辑时必传*/ | |||
@ApiModelProperty(value = "id",required = false) | |||
private String id; | |||
@ApiModelProperty(value = "手机号",required = false) | |||
private String mobile; | |||
@ApiModelProperty(value = "收货人",required = true) | |||
@NotBlank(message = "收货人不能为空") | |||
private String consignee; | |||
@ApiModelProperty(value = "收货人手机号",required = true) | |||
@NotBlank(message = "收货人手机号不能为空") | |||
private String consigneeTel; | |||
@ApiModelProperty(value = "所在地区(省、市、区、街道)",required = true) | |||
@NotBlank(message = "所在地区不能为空") | |||
private String region; | |||
@ApiModelProperty(value = "详细地址",required = true) | |||
@NotBlank(message = "详细地址不能为空") | |||
private String address; | |||
@ApiModelProperty(value = "邮政编码",required = false) | |||
private String postalCode; | |||
@ApiModelProperty(value = "是否为默认地址:1-默认 2-非默认",required = true) | |||
@NotNull(message = "是否为默认地址不能为空") | |||
private Integer defaultAddress; | |||
} |
@@ -0,0 +1,27 @@ | |||
package cn.com.taiji.iaw.dto.comm; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.iaw.dto.AbstractBizRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import javax.validation.constraints.NotBlank; | |||
@ApiModel(description = "地址详情查询请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AddressInfoRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "id",required = false) | |||
@NotBlank(message = "id不能为空") | |||
private String id; | |||
@Override | |||
protected void validate(ViolationValidator validator) { | |||
} | |||
} |
@@ -0,0 +1,22 @@ | |||
package cn.com.taiji.iaw.dto.comm; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.valid.ViolationValidator; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import cn.com.taiji.iaw.dto.AbstractBizRequestDTO; | |||
import io.swagger.annotations.ApiModel; | |||
import io.swagger.annotations.ApiModelProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
@ApiModel(description = "地址列表查询请求") | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class AddressQueryRequestDTO extends AbstractBizRequestDTO { | |||
@ApiModelProperty(value = "手机号",required = false) | |||
private String mobile; | |||
} |
@@ -0,0 +1,25 @@ | |||
package cn.com.taiji.iaw.manager.comm; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import cn.com.taiji.iaw.dto.comm.*; | |||
public interface AddressManager { | |||
Pagination page(AddressQueryRequestDTO dto) throws ManagerException; | |||
IssueOrderAddress findById(AddressInfoRequestDTO dto) throws ManagerException; | |||
IssueOrderAddress add(AddressAddRequestDTO dto) throws ManagerException; | |||
void delete(AddressInfoRequestDTO dto) throws ManagerException; | |||
// PromptTextQueryResponseDTO textQuery(PromptTextQueryRequestDTO dto) throws ManagerException; | |||
// SwiperQueryAllResponseDTO swiperqueryall(SwiperQueryAllRequestDTO dto); | |||
// Pagination highspeednewsflashqiery(HighSpeedNewsFlashRequestDTO dto); | |||
} |
@@ -0,0 +1,174 @@ | |||
package cn.com.taiji.iaw.manager.comm; | |||
import cn.com.taiji.common.manager.ManagerException; | |||
import cn.com.taiji.common.model.dao.Pagination; | |||
import cn.com.taiji.common.pub.BeanTools; | |||
import cn.com.taiji.core.entity.dict.basic.SourceType; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import cn.com.taiji.core.entity.user.AccountInfo; | |||
import cn.com.taiji.core.repo.jpa.issue.IssueOrderAddressRepo; | |||
import cn.com.taiji.core.repo.jpa.user.AccountInfoRepo; | |||
import cn.com.taiji.iaw.dto.comm.*; | |||
import cn.com.taiji.iaw.manager.AbstractCommManager; | |||
import cn.com.taiji.iaw.repo.jpa.request.comm.IssueOrderAddressPageRequest; | |||
import cn.hutool.core.bean.BeanUtil; | |||
import cn.hutool.core.collection.CollectionUtil; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; | |||
import org.springframework.transaction.annotation.Transactional; | |||
import java.time.LocalDateTime; | |||
import java.util.List; | |||
@Service | |||
public class AddressManagerImpl extends AbstractCommManager implements AddressManager { | |||
@Autowired | |||
private AccountInfoRepo accountInfoRepo; | |||
@Autowired | |||
private IssueOrderAddressRepo repo; | |||
// @Autowired | |||
// private QtkPromptTextRepo qtkPromptTextRepo; | |||
// @Autowired | |||
// private MtsSwiperRepo mtsSwiperRepo; | |||
@Transactional(rollbackFor = Exception.class) | |||
@Override | |||
public Pagination page(AddressQueryRequestDTO dto) throws ManagerException { | |||
dto.validate(); | |||
IssueOrderAddressPageRequest req = new IssueOrderAddressPageRequest(); | |||
BeanTools.copyProperties(dto, req); | |||
List<String> openIds = Lists.newArrayList(); | |||
if (SourceType.WECHAT.equals(dto.getOrderSource()) || SourceType.ALI.equals(dto.getOrderSource())) { | |||
openIds.add(dto.getOpenId()); | |||
} else { | |||
if (!hasText(dto.getMobile())) { | |||
List<AccountInfo> allByMobile = accountInfoRepo.findAllByMobile(dto.getMobile()); | |||
if (allByMobile != null && allByMobile.size() > 0) { | |||
for (AccountInfo list : allByMobile) { | |||
openIds.add(list.getOpenId()); | |||
} | |||
} | |||
} | |||
} | |||
req.setOpenIds(openIds); | |||
Pagination pagn = repo.page(req); | |||
return pagn; | |||
} | |||
@Override | |||
public IssueOrderAddress findById(AddressInfoRequestDTO dto) throws ManagerException { | |||
dto.validate(); | |||
return repo.findById(dto.getId()).orElse(null); | |||
} | |||
@Override | |||
public IssueOrderAddress add(AddressAddRequestDTO dto) throws ManagerException { | |||
dto.validate(); | |||
IssueOrderAddress entity = new IssueOrderAddress(); | |||
if (hasText(dto.getId())) { | |||
entity = repo.findById(dto.getId()).orElse(null); | |||
if (entity == null) { | |||
throw new ManagerException("地址不存在"); | |||
} else if (!dto.getOpenId().equals(entity.getOpenId())) { | |||
throw new ManagerException("不是您的地址信息,编辑失败"); | |||
} | |||
BeanUtil.copyProperties(dto, entity, "id", "updateTime" | |||
, "insertTime", "status", "statusTime"); | |||
entity.setUpdateTime(LocalDateTime.now()); | |||
} else { | |||
BeanUtil.copyProperties(dto, entity, "id"); | |||
} | |||
if (hasText(dto.getMobile())) { | |||
AccountInfo byAccount = accountInfoRepo.findByAccount(dto.getMobile()); | |||
if (byAccount == null) { | |||
throw new ManagerException("手机号未注册:" + dto.getMobile()); | |||
} | |||
entity.setOpenId(byAccount.getOpenId()); | |||
} | |||
// 如果编辑的地址设置为默认收货地址,则当前账号下原默认地址并且ID不等于当前编辑的ID需要设置为非默认 | |||
if (entity.getDefaultAddress() == 1) { | |||
changeDefault(entity); | |||
} | |||
repo.save(entity); | |||
return entity; | |||
} | |||
private void changeDefault(IssueOrderAddress entity) { | |||
List<IssueOrderAddress> managementList = repo.listDefault(entity.getOpenId(), entity.getDefaultAddress(), entity.getStatus()); | |||
if (!CollectionUtil.isEmpty(managementList)) { | |||
for (IssueOrderAddress vo : managementList) { | |||
if (!vo.getId().equals(entity.getId())) { | |||
vo.setDefaultAddress(2); | |||
} | |||
repo.saveAll(managementList); | |||
} | |||
} | |||
} | |||
@Override | |||
public void delete(AddressInfoRequestDTO dto) throws ManagerException { | |||
dto.validate(); | |||
IssueOrderAddress entity = repo.findById(dto.getId()).orElse(null); | |||
if (entity == null) { | |||
throw new ManagerException("地址不存在"); | |||
} else if (!dto.getOpenId().equals(entity.getOpenId())) { | |||
throw new ManagerException("不是您的地址信息,删除失败"); | |||
} | |||
entity.setStatus(0);//0-删除、1-正常 | |||
repo.save(entity); | |||
} | |||
// @Override | |||
// public PromptTextQueryResponseDTO textQuery(PromptTextQueryRequestDTO dto) throws ManagerException { | |||
// QtkPromptText qtkPromptText = qtkPromptTextRepo.findByBusinessType(dto.getBusinessType()); | |||
// if (qtkPromptText == null) { | |||
// throw new ManagerException("该业务类型不存在!"); | |||
// } | |||
// PromptTextQueryResponseDTO response = new PromptTextQueryResponseDTO(); | |||
// response.setText(qtkPromptText.getText()); | |||
// response.setTitle(qtkPromptText.getTitle()); | |||
// response.setTextType(qtkPromptText.getTextType()); | |||
// return response; | |||
// } | |||
// | |||
// @Override | |||
// public SwiperQueryAllResponseDTO swiperqueryall(SwiperQueryAllRequestDTO dto) { | |||
// String status = "启用"; | |||
// String swiperId = "轮播图"; | |||
// SwiperPageQueryRequest pageReq = new SwiperPageQueryRequest(); | |||
// pageReq.setStatus(status); | |||
// pageReq.setSwiperId(swiperId); | |||
// List<MtsSwiper> swipers = mtsSwiperRepo.list(pageReq); | |||
// SwiperQueryAllResponseDTO res = new SwiperQueryAllResponseDTO(); | |||
// res.setSwipers(swipers); | |||
// return res; | |||
// } | |||
// | |||
// @Override | |||
// public Pagination highspeednewsflashqiery(HighSpeedNewsFlashRequestDTO dto) { | |||
// Pagination pagination = mtsSwiperRepo.page(dto).convertResult(this::conver); | |||
// return pagination; | |||
// } | |||
// | |||
// private MtsSwiper conver(MtsSwiper m) { | |||
// MtsSwiper swiper = new MtsSwiper(); | |||
// BeanTools.copyProperties(m, swiper); | |||
// if (m.getOrderSource().equals("WECHAT")) { | |||
// swiper.setOrderSource("九州ETC小程序"); | |||
// } else if (m.getOrderSource().equals("SERVICE_HALL")) { | |||
// swiper.setOrderSource("线上营业厅"); | |||
// } else if (m.getOrderSource().equals("WEB")) { | |||
// swiper.setOrderSource("九州ETC小程序"); | |||
// } else if (m.getOrderSource().equals("H5")) { | |||
// swiper.setOrderSource("H5页面"); | |||
// } else { | |||
// swiper.setOrderSource("其他"); | |||
// } | |||
// return swiper; | |||
// } | |||
} |
@@ -0,0 +1,27 @@ | |||
package cn.com.taiji.iaw.repo.jpa.request.comm; | |||
import cn.com.taiji.common.pub.dao.HqlBuilder; | |||
import cn.com.taiji.common.repo.request.jpa.JpaDatePageableDataRequest; | |||
import cn.com.taiji.core.entity.issue.IssueOrderAddress; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
import lombok.experimental.Accessors; | |||
import java.util.List; | |||
@Getter | |||
@Setter | |||
@Accessors(chain = true) | |||
public class IssueOrderAddressPageRequest extends JpaDatePageableDataRequest<IssueOrderAddress> { | |||
private List<String> openIds; // openId列表 | |||
@Override | |||
public HqlBuilder toSelectHql() { | |||
HqlBuilder hql = new HqlBuilder("from " + IssueOrderAddress.class.getName() + " a where 1=1 AND status = 1"); | |||
hql.append(" and openId IN :openId", openIds); | |||
hql.append(" ORDER BY defaultAddress ASC, insertTime DESC"); | |||
return hql; | |||
} | |||
} |
@@ -3,10 +3,10 @@ package cn.com.taiji.ias.tools; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetHandleRecordsLocalModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetOriginListResModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.QueryNewRefundResModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.Attachment; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.QueryNewRefundAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.Attachment; | |||
import cn.com.taiji.ias.model.province.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.province.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.QueryNewRefundAsyncModel; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import javax.annotation.processing.Generated; |
@@ -7,9 +7,9 @@ import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetOriginListResModel; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.model.refundHttp.GetOriginListAsyncRequest; | |||
import cn.com.taiji.ias.model.refundHttp.GetOriginListAsyncResponse; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.province.GetOriginListAsyncRequest; | |||
import cn.com.taiji.ias.model.province.GetOriginListAsyncResponse; | |||
import cn.com.taiji.ias.model.province.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.tools.SourceTargetMapper; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; |
@@ -8,10 +8,10 @@ import cn.com.taiji.core.model.comm.protocol.ias.province.OrderPushResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.OrderPushReqModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.OrderPushResModel; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.model.refundHttp.OrderPushAsyncRequest; | |||
import cn.com.taiji.ias.model.refundHttp.OrderPushAsyncResponse; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderPushAsyncModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderPushAsyncResModel; | |||
import cn.com.taiji.ias.model.province.OrderPushAsyncRequest; | |||
import cn.com.taiji.ias.model.province.OrderPushAsyncResponse; | |||
import cn.com.taiji.ias.model.province.model.OrderPushAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.OrderPushAsyncResModel; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; |
@@ -3,15 +3,12 @@ package cn.com.taiji.ias.manager.province; | |||
import cn.com.taiji.common.manager.AbstractManager; | |||
import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.OrderPushResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.OrderSaveRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.OrderSaveResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.*; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.model.refundHttp.*; | |||
import cn.com.taiji.ias.model.refundHttp.model.*; | |||
import cn.com.taiji.ias.tools.SourceTargetMapper; | |||
import cn.com.taiji.ias.model.province.*; | |||
import cn.com.taiji.ias.model.province.model.*; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; | |||
import org.springframework.stereotype.Service; |
@@ -5,16 +5,11 @@ import cn.com.taiji.common.manager.net.http.ServiceHandleException; | |||
import cn.com.taiji.core.model.comm.protocol.AbstractSignTypeResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetHandleRecordsLocalRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetHandleRecordsLocalResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.GetOriginListResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetHandleRecordsLocalModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetOriginListResModel; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.model.refundHttp.GetHandleRecordsRequest; | |||
import cn.com.taiji.ias.model.refundHttp.GetHandleRecordsResponse; | |||
import cn.com.taiji.ias.model.refundHttp.GetOriginListAsyncRequest; | |||
import cn.com.taiji.ias.model.refundHttp.GetOriginListAsyncResponse; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.province.GetHandleRecordsRequest; | |||
import cn.com.taiji.ias.model.province.GetHandleRecordsResponse; | |||
import cn.com.taiji.ias.model.province.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.tools.SourceTargetMapper; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; |
@@ -7,9 +7,9 @@ import cn.com.taiji.core.model.comm.protocol.ias.province.QueryNewRefundRequest; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.QueryNewRefundResponse; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.QueryNewRefundResModel; | |||
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError; | |||
import cn.com.taiji.ias.model.refundHttp.QueryNewRefundAsyncRequest; | |||
import cn.com.taiji.ias.model.refundHttp.QueryNewRefundAsyncResponse; | |||
import cn.com.taiji.ias.model.refundHttp.model.QueryNewRefundAsyncModel; | |||
import cn.com.taiji.ias.model.province.QueryNewRefundAsyncRequest; | |||
import cn.com.taiji.ias.model.province.QueryNewRefundAsyncResponse; | |||
import cn.com.taiji.ias.model.province.model.QueryNewRefundAsyncModel; | |||
import cn.com.taiji.ias.tools.SourceTargetMapper; | |||
import org.apache.commons.compress.utils.Lists; | |||
import org.springframework.beans.factory.annotation.Autowired; |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.ias.manager.province; | |||
import cn.com.taiji.ias.model.refundHttp.*; | |||
import cn.com.taiji.ias.model.province.*; | |||
import java.io.IOException; | |||
@@ -4,10 +4,10 @@ import cn.com.taiji.common.manager.AbstractManager; | |||
import cn.com.taiji.common.pub.json.JsonTools; | |||
import cn.com.taiji.ias.config.RefundProperties; | |||
import cn.com.taiji.ias.manager.RedisWrapManager; | |||
import cn.com.taiji.ias.model.refundHttp.*; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderPushAsyncModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderSaveAsyncReqModel; | |||
import cn.com.taiji.ias.model.province.*; | |||
import cn.com.taiji.ias.model.province.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.province.model.OrderPushAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.OrderSaveAsyncReqModel; | |||
import cn.com.taiji.ias.tools.HandlerUtils; | |||
import cn.com.taiji.ias.tools.HttpClientUtil; | |||
import cn.com.taiji.ias.tools.PasswordUtil; | |||
@@ -22,7 +22,6 @@ import org.springframework.stereotype.Service; | |||
import java.io.IOException; | |||
import java.time.LocalDateTime; | |||
import java.util.ArrayList; | |||
import java.util.List; | |||
import java.util.Map; | |||
import java.util.concurrent.TimeUnit; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import lombok.Getter; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import lombok.Getter; |
@@ -1,6 +1,6 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.province.model.GetHandleRecordsModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import cn.com.taiji.common.pub.json.JsonTools; |
@@ -0,0 +1,11 @@ | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.ias.model.province.AbstractResponse; | |||
import cn.com.taiji.ias.model.province.model.GetOriginListAsyncModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class GetOriginListAsyncResponse extends AbstractResponse<GetOriginListAsyncModel> { | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderPushAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.OrderPushAsyncModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -1,6 +1,6 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderPushAsyncResModel; | |||
import cn.com.taiji.ias.model.province.model.OrderPushAsyncResModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import cn.com.taiji.ias.model.refundHttp.model.OrderSaveAsyncReqModel; | |||
import cn.com.taiji.ias.model.province.model.OrderSaveAsyncReqModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import lombok.Getter; | |||
import lombok.Setter; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -0,0 +1,14 @@ | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.ias.model.province.model.QueryNewRefundAsyncModel; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class QueryNewRefundAsyncResponse extends cn.com.taiji.ias.model.province.AbstractResponse<QueryNewRefundAsyncModel> { | |||
@JsonProperty("totalcount") | |||
private Integer totalCount; | |||
} |
@@ -1,7 +1,7 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
package cn.com.taiji.ias.model.province; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import cn.com.taiji.ias.model.refundHttp.model.UserModel; | |||
import cn.com.taiji.ias.model.province.model.UserModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonProperty; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonProperty; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonProperty; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,4 +1,4 @@ | |||
package cn.com.taiji.ias.model.refundHttp.model; | |||
package cn.com.taiji.ias.model.province.model; | |||
import cn.com.taiji.common.entity.BaseEntity; | |||
import com.fasterxml.jackson.annotation.JsonFormat; |
@@ -1,10 +0,0 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetOriginListAsyncModel; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class GetOriginListAsyncResponse extends AbstractResponse<GetOriginListAsyncModel>{ | |||
} |
@@ -1,14 +0,0 @@ | |||
package cn.com.taiji.ias.model.refundHttp; | |||
import cn.com.taiji.ias.model.refundHttp.model.QueryNewRefundAsyncModel; | |||
import com.fasterxml.jackson.annotation.JsonProperty; | |||
import lombok.Getter; | |||
import lombok.Setter; | |||
@Getter | |||
@Setter | |||
public class QueryNewRefundAsyncResponse extends AbstractResponse<QueryNewRefundAsyncModel> { | |||
@JsonProperty("totalcount") | |||
private Integer totalCount; | |||
} |
@@ -3,9 +3,9 @@ package cn.com.taiji.ias.tools; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetHandleRecordsLocalModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.GetOriginListResModel; | |||
import cn.com.taiji.core.model.comm.protocol.ias.province.model.QueryNewRefundResModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.refundHttp.model.QueryNewRefundAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.GetHandleRecordsModel; | |||
import cn.com.taiji.ias.model.province.model.GetOriginListAsyncModel; | |||
import cn.com.taiji.ias.model.province.model.QueryNewRefundAsyncModel; | |||
import org.mapstruct.Mapper; | |||
import org.mapstruct.ReportingPolicy; | |||
import org.mapstruct.factory.Mappers; |