commit
469816d26e
@ -0,0 +1,20 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.repository;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
public interface ApsNoticeClientRepository {
|
||||
void saveApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||
|
||||
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||
|
||||
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||
|
||||
void updateApsNoticeClientByPartnerCode(Date modifyTime, String modifier, String partnerCode);
|
||||
|
||||
ApsNoticeClient getApsNoticeClientById(String id);
|
||||
}
|
@ -0,0 +1,20 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.repository;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
public interface ApsNoticeRepository {
|
||||
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||
|
||||
ApsNotice saveApsNotice(ApsNotice apsNotice);
|
||||
|
||||
void updateApsNotice(JSONObject apsNotice);
|
||||
|
||||
ApsNotice getApsNoticesById(String id);
|
||||
|
||||
List<JSONObject> getApsNotice(String id);
|
||||
}
|
@ -0,0 +1,9 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.service;
|
||||
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
public interface ApsNoticeClientsService {
|
||||
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||
}
|
@ -0,0 +1,19 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.service;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
|
||||
public interface ApsNoticeService {
|
||||
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||
|
||||
void saveApsNotice(JSONObject manager, AddNoticeCommand addNoticeCommand);
|
||||
|
||||
void updateApsNoticeClient(JSONObject manager, ApsNoticeClient apsNoticeClient);
|
||||
|
||||
AddNoticeCommand getApsNotice(String id);
|
||||
|
||||
void updateApsNotice(JSONObject manager, JSONObject apsNotice);
|
||||
}
|
@ -0,0 +1,49 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.service.Impl;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeClientsService;
|
||||
import au.com.royalpay.payment.manage.mappers.system.ClientAccountMapper;
|
||||
import au.com.royalpay.payment.manage.mappers.system.ManagerMapper;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
@Service
|
||||
public class ApsNoticeClientsServiceImpl implements ApsNoticeClientsService {
|
||||
|
||||
@Autowired
|
||||
private ApsNoticeClientRepository apsNoticeClientRepository;
|
||||
|
||||
@Autowired
|
||||
private ManagerMapper managerMapper;
|
||||
|
||||
@Autowired
|
||||
private ClientAccountMapper clientAccountMapper;
|
||||
|
||||
@Override
|
||||
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
|
||||
PageList<JSONObject> apsNoticeClients = apsNoticeClientRepository.getApsNoticeClients(id, pageBounds);
|
||||
for (JSONObject apsNoticeClient : apsNoticeClients) {
|
||||
if (apsNoticeClient.containsKey("modifier") && StringUtils.isNotBlank(apsNoticeClient.getString("modifier"))) {
|
||||
JSONObject modifier = managerMapper.findDetail(apsNoticeClient.getString("modifier"));
|
||||
if (modifier != null) {
|
||||
apsNoticeClient.put("modifier_name", modifier.getString("username"));
|
||||
}
|
||||
}
|
||||
if (apsNoticeClient.containsKey("user_id") && StringUtils.isNotBlank(apsNoticeClient.getString("user_id"))) {
|
||||
if (apsNoticeClient.getString("user_id").equals("0")) {
|
||||
apsNoticeClient.put("user_name", "未知");
|
||||
} else {
|
||||
JSONObject user = clientAccountMapper.findDetail(apsNoticeClient.getString("user_id"));
|
||||
if (user != null) {
|
||||
apsNoticeClient.put("user_name", user.getString("username"));
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return apsNoticeClients;
|
||||
}
|
||||
}
|
@ -0,0 +1,83 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.domain.service.Impl;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeRepository;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeService;
|
||||
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
@Service
|
||||
public class ApsNoticeServiceImpl implements ApsNoticeService {
|
||||
|
||||
@Autowired
|
||||
private ApsNoticeRepository apsNoticeRepository;
|
||||
|
||||
@Autowired
|
||||
private ApsNoticeClientRepository apsNoticeClientRepository;
|
||||
|
||||
@Override
|
||||
public PageList<JSONObject> getApsNotices(PageBounds pageBounds) {
|
||||
return apsNoticeRepository.getApsNotices(pageBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void saveApsNotice(JSONObject manager, AddNoticeCommand addNoticeCommand) {
|
||||
// 保存消息数据
|
||||
ApsNotice saveApsNotice = addNoticeCommand.saveApsNotice(addNoticeCommand, manager);
|
||||
ApsNotice apsNotice = apsNoticeRepository.saveApsNotice(saveApsNotice);
|
||||
for (String partnerCode : addNoticeCommand.getPartnerCodes()) {
|
||||
if (StringUtils.isNotBlank(partnerCode)) {
|
||||
apsNoticeClientRepository.updateApsNoticeClientByPartnerCode(new Date(), manager.getString("manager_id"), partnerCode);
|
||||
ApsNoticeClient apsNoticeClient = addNoticeCommand.saveApsNoticeClient(partnerCode, manager, apsNotice.getId());
|
||||
apsNoticeClientRepository.saveApsNoticeClient(apsNoticeClient);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApsNoticeClient(JSONObject manager, ApsNoticeClient apsNoticeClient) {
|
||||
ApsNoticeClient apsNoticeClientById = apsNoticeClientRepository.getApsNoticeClientById(apsNoticeClient.getId());
|
||||
apsNoticeClientById.setModifier(manager.getString("manager_id"));
|
||||
apsNoticeClientById.setModifyTime(new Date());
|
||||
if (apsNoticeClient.getHandle() != null) {
|
||||
apsNoticeClientById.setHandle(apsNoticeClient.getHandle());
|
||||
}
|
||||
if (apsNoticeClient.getIsValid() != null) {
|
||||
apsNoticeClientById.setIsValid(apsNoticeClient.getIsValid());
|
||||
}
|
||||
apsNoticeClientRepository.updateApsNoticeClient(apsNoticeClientById);
|
||||
}
|
||||
|
||||
@Override
|
||||
public AddNoticeCommand getApsNotice(String id) {
|
||||
List<JSONObject> apsNotice = apsNoticeRepository.getApsNotice(id);
|
||||
AddNoticeCommand addNoticeCommand = new AddNoticeCommand();
|
||||
ArrayList<String> codes = new ArrayList<>();
|
||||
for (JSONObject a : apsNotice) {
|
||||
addNoticeCommand.setTitle(a.getString("title"));
|
||||
addNoticeCommand.setContent(a.getString("content"));
|
||||
addNoticeCommand.setCreateTime(a.getDate("create_time"));
|
||||
codes.add(a.getString("partner_code"));
|
||||
}
|
||||
addNoticeCommand.setPartnerCodes(codes.toArray(new String[codes.size()]));
|
||||
return addNoticeCommand;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApsNotice(JSONObject manager, JSONObject apsNotice) {
|
||||
apsNotice.put("modifier", manager.getString("manager_id"));
|
||||
apsNotice.put("modify_time", new Date());
|
||||
apsNoticeRepository.updateApsNotice(apsNotice);
|
||||
}
|
||||
}
|
@ -0,0 +1,44 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.infrastructure.repository;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeClientRepository;
|
||||
import au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeClientMapper;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Repository
|
||||
public class ApsNoticeClientRepositoryImpl implements ApsNoticeClientRepository {
|
||||
|
||||
@Autowired
|
||||
private ApsNoticeClientMapper mapper;
|
||||
|
||||
@Override
|
||||
public void saveApsNoticeClient(ApsNoticeClient apsNoticeClient) {
|
||||
mapper.saveApsNoticeClient(apsNoticeClient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApsNoticeClient(ApsNoticeClient apsNoticeClient) {
|
||||
mapper.updateApsNoticeClient(apsNoticeClient);
|
||||
}
|
||||
|
||||
@Override
|
||||
public PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds) {
|
||||
return mapper.getApsNoticeClients(id, pageBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApsNoticeClientByPartnerCode(Date modifyTime, String modifier, String partnerCode) {
|
||||
mapper.updateApsNoticeClientByPartnerCode(modifyTime, modifier, partnerCode);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApsNoticeClient getApsNoticeClientById(String id) {
|
||||
return mapper.getApsNoticeClientById(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.infrastructure.repository;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.repository.ApsNoticeRepository;
|
||||
import au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeMapper;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public class ApsNoticeRepositoryImpl implements ApsNoticeRepository {
|
||||
|
||||
@Autowired
|
||||
private ApsNoticeMapper mapper;
|
||||
|
||||
@Override
|
||||
public PageList<JSONObject> getApsNotices(PageBounds pageBounds) {
|
||||
return mapper.getApsNotices(pageBounds);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApsNotice saveApsNotice(ApsNotice apsNotice) {
|
||||
mapper.saveApsNotice(apsNotice);
|
||||
return mapper.getApsNoticesById(apsNotice.getId());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void updateApsNotice(JSONObject apsNotice) {
|
||||
mapper.updateApsNotice(apsNotice);
|
||||
}
|
||||
|
||||
@Override
|
||||
public ApsNotice getApsNoticesById(String id) {
|
||||
return mapper.getApsNoticesById(id);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<JSONObject> getApsNotice(String id) {
|
||||
return mapper.getApsNotice(id);
|
||||
}
|
||||
}
|
@ -0,0 +1,104 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.web;
|
||||
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeClientsService;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.service.ApsNoticeService;
|
||||
import au.com.royalpay.payment.manage.apsKYC.web.command.AddNoticeCommand;
|
||||
import au.com.royalpay.payment.manage.permission.manager.ManagerMapping;
|
||||
import au.com.royalpay.payment.tools.CommonConsts;
|
||||
import au.com.royalpay.payment.tools.permission.enums.ManagerRole;
|
||||
import au.com.royalpay.payment.tools.utils.PageListUtils;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@RestController
|
||||
@RequestMapping(value = "/aps/kyc")
|
||||
public class RestApsKYCController {
|
||||
|
||||
@Resource
|
||||
private ApsNoticeService apsNoticeService;
|
||||
|
||||
@Resource
|
||||
private ApsNoticeClientsService apsNoticeClientsService;
|
||||
|
||||
/**
|
||||
* 获取消息通知列表
|
||||
*
|
||||
* @param page 当前页
|
||||
* @param pageSize 每页数
|
||||
* @return
|
||||
*/
|
||||
@ManagerMapping(value = "/notices", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.SALES_MANAGER})
|
||||
public JSONObject getApsNotices(@RequestParam(value = "page", defaultValue = "1") int page,
|
||||
@RequestParam(value = "pageSize", defaultValue = "10") int pageSize) {
|
||||
PageBounds pageBounds = new PageBounds(page, pageSize);
|
||||
PageList<JSONObject> apply = apsNoticeService.getApsNotices(pageBounds);
|
||||
return PageListUtils.buildPageListResult(apply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息通知详情
|
||||
*
|
||||
* @param id 通知id
|
||||
* @return AddNoticeCommand
|
||||
*/
|
||||
@ManagerMapping(value = "/notice", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.SALES_MANAGER})
|
||||
public AddNoticeCommand getApsNotice(@RequestParam String id) {
|
||||
return apsNoticeService.getApsNotice(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改消息
|
||||
*
|
||||
* @param manager
|
||||
* @param apsNotice
|
||||
*/
|
||||
@ManagerMapping(value = "/notice", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SALES_MANAGER})
|
||||
public void updateApsNotice(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody JSONObject apsNotice) {
|
||||
apsNoticeService.updateApsNotice(manager, apsNotice);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取消息通知商户列表
|
||||
*
|
||||
* @param page 当前页
|
||||
* @param pageSize 每页数
|
||||
* @param id 消息id
|
||||
* @return JSONObject
|
||||
*/
|
||||
@ManagerMapping(value = "/notice/clients", method = RequestMethod.GET, role = {ManagerRole.ADMIN, ManagerRole.SALES_MANAGER})
|
||||
public JSONObject getApsNoticeClients(@RequestParam(value = "page", defaultValue = "1") int page,
|
||||
@RequestParam(value = "pageSize", defaultValue = "20") int pageSize,
|
||||
@RequestParam String id) {
|
||||
PageBounds pageBounds = new PageBounds(page, pageSize);
|
||||
PageList<JSONObject> apply = apsNoticeClientsService.getApsNoticeClients(id, pageBounds);
|
||||
return PageListUtils.buildPageListResult(apply);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增消息通知
|
||||
*
|
||||
* @param manager 运营用户
|
||||
* @param addNoticeCommand 新增数据
|
||||
*/
|
||||
@ManagerMapping(value = "/notice", method = RequestMethod.POST, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SALES_MANAGER})
|
||||
public void addApsNotice(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody AddNoticeCommand addNoticeCommand) {
|
||||
apsNoticeService.saveApsNotice(manager, addNoticeCommand);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改商户数据
|
||||
*
|
||||
* @param manager 运营数据
|
||||
* @param apsNoticeClient 消息关联商户数据
|
||||
*/
|
||||
@ManagerMapping(value = "/notice/client", method = RequestMethod.PUT, role = {ManagerRole.ADMIN, ManagerRole.OPERATOR, ManagerRole.SALES_MANAGER})
|
||||
public void updateApsNoticeClient(@ModelAttribute(CommonConsts.MANAGER_STATUS) JSONObject manager, @RequestBody ApsNoticeClient apsNoticeClient) {
|
||||
apsNoticeService.updateApsNoticeClient(manager, apsNoticeClient);
|
||||
}
|
||||
}
|
@ -0,0 +1,45 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.web.command;
|
||||
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
import org.joda.time.DateTime;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class AddNoticeCommand {
|
||||
|
||||
private String[] partnerCodes;
|
||||
|
||||
private String title;
|
||||
|
||||
private String content;
|
||||
|
||||
private Date createTime;
|
||||
|
||||
public ApsNotice saveApsNotice(AddNoticeCommand addNoticeDescriptor, JSONObject manager) {
|
||||
return new ApsNotice()
|
||||
.setCreateTime(new Date())
|
||||
.setCreator(manager.getString("manager_id"))
|
||||
.setTitle(addNoticeDescriptor.getTitle())
|
||||
.setContent(addNoticeDescriptor.getContent());
|
||||
}
|
||||
|
||||
public ApsNoticeClient saveApsNoticeClient(String partnerCode, JSONObject manager, String noticeId) {
|
||||
return new ApsNoticeClient()
|
||||
.setCreateTime(new Date())
|
||||
.setCreator(manager.getString("manager_id"))
|
||||
.setNoticeId(noticeId)
|
||||
.setPartnerCode(partnerCode)
|
||||
.setIsValid(0)
|
||||
.setHandle(0)
|
||||
.setStatus(0);
|
||||
}
|
||||
}
|
@ -0,0 +1,13 @@
|
||||
package au.com.royalpay.payment.manage.apsKYC.web.command;
|
||||
|
||||
import lombok.AllArgsConstructor;
|
||||
import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
@Data
|
||||
@NoArgsConstructor
|
||||
@AllArgsConstructor
|
||||
public class SelectApsNoticeCommand {
|
||||
private int limit = 10;
|
||||
private int page = 1;
|
||||
}
|
@ -0,0 +1,34 @@
|
||||
package au.com.royalpay.payment.manage.mappers.apskyc;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNoticeClient;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
|
||||
import java.util.Date;
|
||||
|
||||
@AutoMapper(tablename = "sys_aps_notice_clients", pkName = "id")
|
||||
public interface ApsNoticeClientMapper {
|
||||
|
||||
@AutoSql(SqlType.INSERT)
|
||||
void saveApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||
|
||||
@AutoSql(SqlType.UPDATE)
|
||||
void updateApsNoticeClient(ApsNoticeClient apsNoticeClient);
|
||||
|
||||
PageList<JSONObject> getApsNoticeClients(String id, PageBounds pageBounds);
|
||||
|
||||
void updateApsNoticeClientByPartnerCode(@Param("modify_time") Date modifyTime, @Param("modifier") String modifier, @Param("partner_code") String partnerCode);
|
||||
|
||||
@AutoSql(SqlType.SELECT)
|
||||
ApsNoticeClient getApsNoticeClientById(String id);
|
||||
|
||||
JSONObject getApsKycClient(@Param("client_moniker")String clientMoniker);
|
||||
|
||||
@AutoSql(SqlType.UPDATE)
|
||||
void toUpdateApsKycClient(JSONObject updateReadTime);
|
||||
}
|
@ -0,0 +1,27 @@
|
||||
package au.com.royalpay.payment.manage.mappers.apskyc;
|
||||
|
||||
import au.com.royalpay.payment.manage.apsKYC.domain.entity.ApsNotice;
|
||||
import com.alibaba.fastjson.JSONObject;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageBounds;
|
||||
import com.github.miemiedev.mybatis.paginator.domain.PageList;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.AutoMapper;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.AutoSql;
|
||||
import com.yixsoft.support.mybatis.autosql.annotations.SqlType;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@AutoMapper(tablename = "sys_aps_notice", pkName = "id")
|
||||
public interface ApsNoticeMapper {
|
||||
PageList<JSONObject> getApsNotices(PageBounds pageBounds);
|
||||
|
||||
@AutoSql(SqlType.INSERT)
|
||||
void saveApsNotice(ApsNotice apsNotice);
|
||||
|
||||
@AutoSql(SqlType.SELECT)
|
||||
ApsNotice getApsNoticesById(String id);
|
||||
|
||||
@AutoSql(SqlType.UPDATE)
|
||||
void updateApsNotice(JSONObject apsNotice);
|
||||
|
||||
List<JSONObject> getApsNotice(String id);
|
||||
}
|
@ -0,0 +1,31 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeClientMapper">
|
||||
<update id="updateApsNoticeClientByPartnerCode">
|
||||
UPDATE sys_aps_notice_clients
|
||||
SET modifier = #{modifier},
|
||||
modify_time = #{modify_time},
|
||||
is_valid = 1
|
||||
WHERE partner_code = #{partner_code}
|
||||
</update>
|
||||
<select id="getApsNoticeClients" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT *
|
||||
FROM sys_aps_notice_clients
|
||||
where notice_id = #{id}
|
||||
</select>
|
||||
<select id="getApsKycClient" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT c.*,
|
||||
n.title,
|
||||
n.content
|
||||
FROM sys_aps_notice_clients c
|
||||
INNER JOIN sys_aps_notice n ON n.id = c.notice_id
|
||||
WHERE c.partner_code = #{client_moniker}
|
||||
AND n.`status` = 0
|
||||
AND c.`status` IN (0, 1)
|
||||
AND c.is_valid = 0
|
||||
AND c.handle = 0
|
||||
</select>
|
||||
|
||||
</mapper>
|
@ -0,0 +1,29 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="au.com.royalpay.payment.manage.mappers.apskyc.ApsNoticeMapper">
|
||||
<select id="getApsNotices"
|
||||
resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT n.id,
|
||||
n.create_time createTime,
|
||||
n.title,
|
||||
n.content,
|
||||
n.status,
|
||||
count(c.id) clientsNum,
|
||||
sum(IF(c.`status` = 0, 1, 0)) noRead,
|
||||
sum(IF(c.`status` = 2, 1, 0)) agree,
|
||||
sum(IF(c.handle = 1, 1, 0)) handleNum
|
||||
FROM sys_aps_notice n
|
||||
INNER JOIN sys_aps_notice_clients c
|
||||
ON n.id = c.notice_id
|
||||
GROUP BY c.notice_id
|
||||
ORDER BY n.create_time DESC
|
||||
</select>
|
||||
<select id="getApsNotice" resultType="com.alibaba.fastjson.JSONObject">
|
||||
SELECT n.title, n.content, c.partner_code, n.create_time
|
||||
FROM sys_aps_notice n
|
||||
INNER JOIN sys_aps_notice_clients c ON c.notice_id = n.id
|
||||
where n.id = #{id}
|
||||
</select>
|
||||
</mapper>
|
@ -0,0 +1,108 @@
|
||||
<section class="content-header">
|
||||
<h1>新增A+KYC通知</h1>
|
||||
</section>
|
||||
<div class="content">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
<form novalidate name="addNoticeFrom">
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':addNoticeFrom.partner_code.$invalid && addNoticeFrom.partner_code.$dirty}">
|
||||
<label class="control-label col-sm-2" for="partner_code_input">* 商户编码</label>
|
||||
<div class="col-xs-10">
|
||||
<textarea
|
||||
id="partner_code_input"
|
||||
rows="5"
|
||||
style="width: 100%;resize:none;"
|
||||
required
|
||||
ng-readonly="isUpdate"
|
||||
ng-disabled="isUpdate"
|
||||
name="partner_code"
|
||||
placeholder="请输入商户编码(逗号隔开)"
|
||||
ng-model="saveNoticeData.partnerCodes">
|
||||
</textarea>
|
||||
<div ng-messages="addNoticeFrom.partner_code.$error"
|
||||
ng-if="addNoticeFrom.partner_code.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':addNoticeFrom.title.$invalid && addNoticeFrom.title.$dirty}">
|
||||
<label class="control-label col-sm-2" for="title_input">* 通知标题</label>
|
||||
<div class="col-xs-10">
|
||||
<input type="text"
|
||||
id="title_input"
|
||||
required
|
||||
style="width: 100%"
|
||||
name="title"
|
||||
placeholder="请输入通知标题"
|
||||
ng-model="saveNoticeData.title">
|
||||
<div ng-messages="addNoticeFrom.title.$error"
|
||||
ng-if="addNoticeFrom.title.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="form-group"
|
||||
ng-class="{'has-error':addNoticeFrom.content.$invalid && addNoticeFrom.content.$dirty}">
|
||||
<label class="control-label col-sm-2" for="content_input">* 通知内容</label>
|
||||
<div class="col-xs-10">
|
||||
<ueditor id="content_input" name="content" required ng-model="saveNoticeData.content"
|
||||
ue-height="400"></ueditor>
|
||||
<div ng-messages="addNoticeFrom.content.$error"
|
||||
ng-if="addNoticeFrom.content.$dirty">
|
||||
<p class="small text-danger"
|
||||
ng-message="required">required field
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div class="margin-bottom margin-top" style="text-align: right">
|
||||
<a role="button"
|
||||
style="margin-left: 10px;"
|
||||
ng-click="$dismiss()"
|
||||
class="btn btn-danger">cancel
|
||||
</a>
|
||||
<button class="btn btn-success"
|
||||
type="button"
|
||||
id="save-risk-btn"
|
||||
ng-click="saveNotice(addNoticeFrom)">Save
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<style type="text/css">
|
||||
.edui-default .edui-editor {
|
||||
border: 1px solid #d4d4d4;
|
||||
background-color: white;
|
||||
position: relative;
|
||||
overflow: visible;
|
||||
-webkit-border-radius: 4px;
|
||||
-moz-border-radius: 4px;
|
||||
border-radius: 4px;
|
||||
width: 100% !important;
|
||||
}
|
||||
|
||||
.edui-default .edui-editor-iframeholder {
|
||||
width: 100% !important;
|
||||
position: relative;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
|
||||
|
@ -0,0 +1,157 @@
|
||||
<section class="content-header">
|
||||
<h1>A+KYC通知</h1>
|
||||
<ol class="breadcrumb">
|
||||
<li>
|
||||
<i class="fa fa-sitemap"></i> Compliance Management
|
||||
</li>
|
||||
<li class="active">A+KYC通知</li>
|
||||
</ol>
|
||||
</section>
|
||||
|
||||
<div class="box box-warning" style="margin-top: 30px;">
|
||||
<div class="box-header">
|
||||
<div class="row">
|
||||
<div class="col-sm-12">
|
||||
<div class="form-horizontal">
|
||||
<button class="btn btn-success" style="float: right" type="button" ng-click="addNotice()">
|
||||
<i class="fa fa-plus"></i> 新增
|
||||
</button>
|
||||
</div>
|
||||
<br/><br/>
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>通知时间</th>
|
||||
<th>通知标题</th>
|
||||
<th>通知商户数</th>
|
||||
<th>未读数</th>
|
||||
<th>同意数</th>
|
||||
<th>合规处理数</th>
|
||||
<th style="text-align: center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="(index,item) in apply" ng-click="getNoticeClients(item.title,item.id,1,index)">
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">{{ item.createTime }}
|
||||
</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">{{ item.title }}</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">
|
||||
<a href="" type="button">
|
||||
{{ item.clientsNum }}
|
||||
</a>
|
||||
</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">{{ item.noRead }}</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">{{ item.agree }}</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}">{{ item.handleNum }}
|
||||
</td>
|
||||
<td ng-style="{'background-color':selectIndex==index?'#f06101 ':''}"
|
||||
style="text-align: center">
|
||||
<a href="" type="button">
|
||||
<i ng-if="item.status == 0" class="fa fa-times" style="color: red"
|
||||
ng-click="stopNotice(item.id)"> 禁用</i>
|
||||
<i ng-if="item.status == 1" readonly class="fa fa-times"
|
||||
style="color: #727272"> 已禁用</i>
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="" type="button">
|
||||
<i class="fa fa-file-text-o" ng-click="updateNotice(item.id)"> 编辑</i>
|
||||
</a>
|
||||
<span> | </span>
|
||||
<a href="" type="button">
|
||||
<i class="fa fa-eye" ng-click="catNotice(item.id)"> 预览</i>
|
||||
</a>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<uib-pagination ng-if="apply.length"
|
||||
class="pagination"
|
||||
total-items="pagination.totalCount"
|
||||
boundary-links="true"
|
||||
ng-model="pagination.page"
|
||||
items-per-page="pagination.limit"
|
||||
max-size="10"
|
||||
ng-change="loadApsNotice()"
|
||||
previous-text="‹"
|
||||
next-text="›"
|
||||
first-text="«"
|
||||
last-text="»"></uib-pagination>
|
||||
<div class="col-xs-12">Total Records:{{pagination.totalCount}};Total Pages:{{pagination.totalPages}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="box box-danger" ng-if="showClients">
|
||||
<div class="modal-body">
|
||||
<h3>{{clientTitle}}—商户列表</h3>
|
||||
<div class="box-body table-responsive">
|
||||
<table class="table table-bordered table-striped table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>商户名称</th>
|
||||
<th style="text-align: center">商户操作状态</th>
|
||||
<th style="text-align: center">运营操作状态</th>
|
||||
<th style="text-align: center">操作</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr ng-repeat="item in noticeClients">
|
||||
<td>{{item.partner_code}}</td>
|
||||
<td style="text-align: center">
|
||||
<span ng-if="item.status == 0" style="color: black">未读</span>
|
||||
<span ng-if="item.status == 1" style="color: #c09d03">已读({{item.user_name}} {{ item.read_time
|
||||
}})</span>
|
||||
<span ng-if="item.status == 2" style="color: #00a65a">同意({{item.user_name}} {{ item.status_time
|
||||
}})</span>
|
||||
<span ng-if="item.status == 3" style="color: red">拒绝({{item.user_name}} {{ item.status_time
|
||||
}})</span>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<a href="" type="button"><span ng-if="item.handle == 0">未处理</span></a>
|
||||
<span ng-if="item.handle == 1"
|
||||
style="color: #00a65a">已处理({{ item.modifier_name }} {{ item.modify_time }})</span>
|
||||
</td>
|
||||
<td style="text-align: center">
|
||||
<a href="" type="button" ng-if="item.is_valid == 0">
|
||||
<i class="fa fa-times" style="color: red"
|
||||
ng-click="stopNoticeClient(item.notice_id,item.id)">禁用</i>
|
||||
<span ng-if="item.status == 2"> | </span>
|
||||
<i class="fa fa-check"
|
||||
aria-hidden="true"
|
||||
ng-if="item.status == 2"
|
||||
ng-click="setHandle(item.notice_id,item.id)">处理</i>
|
||||
</a>
|
||||
<i ng-if="item.is_valid == 1" readonly class="fa fa-times"
|
||||
style="color: #727272">已禁用</i>
|
||||
</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="modal-footer">
|
||||
<uib-pagination ng-if="noticeClients.length"
|
||||
class="pagination"
|
||||
total-items="clientPagination.totalCount"
|
||||
boundary-links="true"
|
||||
ng-model="clientPagination.page"
|
||||
items-per-page="clientPagination.limit"
|
||||
max-size="10"
|
||||
ng-change="loadApsNoticeClients()"
|
||||
previous-text="‹"
|
||||
next-text="›"
|
||||
first-text="«"
|
||||
last-text="»"></uib-pagination>
|
||||
<div class="col-xs-12">Total Records:{{clientPagination.totalCount}};Total Pages:{{clientPagination.totalPages}}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
@ -0,0 +1,40 @@
|
||||
<div class="modal-header bg-green" style="text-align: center">
|
||||
<h4>{{ noticeDetail.title }}</h4>
|
||||
<span>({{ noticeDetail.createTime }})</span>
|
||||
</div>
|
||||
<div class="modal-body" style="padding: 20px">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<div id="input"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
<div>
|
||||
<hr>
|
||||
<div>已通知商户:</div>
|
||||
<textarea
|
||||
readonly
|
||||
disabled
|
||||
rows="3"
|
||||
style="width: 100%;resize:none;"
|
||||
ng-model="noticeDetail.partnerCodes"></textarea>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="modal-footer">
|
||||
<button class="btn btn-danger" type="button" ng-click="$dismiss()">关闭</button>
|
||||
</div>
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
After Width: | Height: | Size: 1.6 KiB |
@ -0,0 +1,32 @@
|
||||
<div class="modal-header bg-green">
|
||||
<div></div>
|
||||
<h4 style="text-align: center">{{ item.title }}</h4>
|
||||
</div>
|
||||
<div class="modal-body" style="padding: 20px">
|
||||
<div class="row">
|
||||
<div class="col-xs-12">
|
||||
<div class="form-horizontal">
|
||||
<div class="form-group">
|
||||
<div class="col-xs-12">
|
||||
<div id="aps_kyc_info"></div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<br/>
|
||||
<br/>
|
||||
</div>
|
||||
|
||||
<div class="modal-footer">
|
||||
<div style="display: flex;justify-content: space-between">
|
||||
<div>
|
||||
<button style="text-align: right" class="btn btn-warning" ng-click="updateApsKyc(1)" type="button">关闭
|
||||
</button>
|
||||
</div>
|
||||
<div>
|
||||
<button class="btn btn-danger" ng-click="updateApsKyc(3)" type="button">拒绝</button>
|
||||
<button class="btn btn-success" ng-click="updateApsKyc(2)" type="button">同意</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
Loading…
Reference in new issue