IPublicService.java 6.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251
  1. package com.minpay.common.service;
  2. import java.util.List;
  3. import java.util.Map;
  4. import javax.servlet.http.HttpServletRequest;
  5. import javax.servlet.http.HttpSession;
  6. import org.apache.commons.fileupload.FileItem;
  7. import com.minpay.common.exception.BusinessCodeException;
  8. import com.minpay.db.table.model.PubApppar;
  9. import com.startup.minpay.frame.business.MINHttpServletRequestContext;
  10. import com.startup.minpay.frame.core.IMINInitializer;
  11. import com.startup.minpay.frame.exception.MINBusinessException;
  12. import com.startup.minpay.frame.service.base.IMINLocalService;
  13. import com.startup.minpay.frame.session.MINSession;
  14. public interface IPublicService extends IMINLocalService, IMINInitializer {
  15. public void init() throws MINBusinessException ;
  16. /**
  17. * 获取当前用户的权限列表
  18. * @param request
  19. * @return
  20. */
  21. public Map<String, String> getRoleBsn(String roleId);
  22. /**
  23. * 获取客户端IP地址
  24. * @param request
  25. * @return
  26. */
  27. public String getIPAddress(HttpServletRequest request);
  28. /**
  29. * 获取系统参数值
  30. *
  31. * @return
  32. * @throws MINBusinessException
  33. */
  34. public String getSysParValue(String sprCode) throws MINBusinessException;
  35. /**
  36. * 获取移动端应用参数
  37. *
  38. * @return
  39. * @throws MINBusinessException
  40. */
  41. public Map<String, String> getAppPar4Mobile() throws MINBusinessException;
  42. /**
  43. * 获取应用参数
  44. *
  45. * @return
  46. * @throws MINBusinessException
  47. */
  48. public Map<String, Object> getAppPar() throws MINBusinessException;
  49. /**
  50. * 获取移动端应用参数列表
  51. *
  52. * @return
  53. * @throws MINBusinessException
  54. */
  55. public Map<String, Object> getAppParList4Mobile()
  56. throws MINBusinessException;
  57. /**
  58. * 获取应用参数列表
  59. *
  60. * @return
  61. * @throws MINBusinessException
  62. */
  63. public List<PubApppar> getAppParList(String code) throws MINBusinessException;
  64. /**
  65. * 根据应用参数码获取应用参数值
  66. *
  67. * @param aprCode
  68. * @param aprLanguage
  69. * @return
  70. * @throws MINBusinessException
  71. */
  72. public Map<String, Object> getAppParValueByCode(String aprCode,
  73. String aprLanguage) throws MINBusinessException;
  74. /**
  75. * 获取移动端系统参数
  76. *
  77. * @return
  78. * @throws MINBusinessException
  79. */
  80. public Map<String, Object> getSysPar4Mobile() throws MINBusinessException;
  81. /**
  82. * 获取系统参数
  83. *
  84. * @return
  85. * @throws MINBusinessException
  86. */
  87. public Map<String, Object> getSysPar() throws MINBusinessException;
  88. /**
  89. * 根据系统参数代码获取系统参数值
  90. *
  91. * @param sprCode
  92. * @return
  93. * @throws MINBusinessException
  94. */
  95. public Map<String, String> getSysParValueByCode(String sprCode)
  96. throws MINBusinessException;
  97. /**
  98. * 解密操作
  99. *
  100. * @param randomKey
  101. * @param passWord
  102. * @return
  103. * @throws MINBusinessException
  104. */
  105. public String DecryptOcxPassword(String randomKey, String passWord)
  106. throws MINBusinessException;
  107. /**
  108. * 短信码校验
  109. *
  110. * @param mobileValidateCode
  111. * @param session
  112. * @return
  113. * @throws MINBusinessException
  114. */
  115. public Map<String, String> validateMobileCode(String mobileValidateCode,
  116. HttpSession session) throws MINBusinessException;
  117. /**
  118. * 短信码校验 手机号 校验超时时间
  119. *
  120. * @param mobileValidateCode
  121. * @param mobileNo
  122. * @param session
  123. * @return
  124. * @throws MINBusinessException
  125. */
  126. public Map<String, String> validateMobileCode(String mobileValidateCode,
  127. String mobileNo,HttpSession session) throws MINBusinessException;
  128. /**
  129. * 验证手机号是否被注册
  130. *
  131. * @param moblie
  132. * @return
  133. * @throws MINBusinessException
  134. */
  135. public String vertiyMoblie(String moblie) throws MINBusinessException;
  136. /**
  137. * 上传文件到本地
  138. * @param file 上传文件
  139. * @param fileType 文件类型,用于区分文件路径上传
  140. * @param size 缓冲区 默认512,大文件需要手动修改
  141. * @param renameFlag 是否重命名
  142. * @return
  143. * @throws MINBusinessException
  144. * @throws BusinessCodeException
  145. */
  146. public Map<String, Object> uploadFile(FileItem file,String fileType,int size,boolean renameFlag,String channel) throws MINBusinessException,BusinessCodeException;
  147. /**
  148. * 上传多个文件
  149. * @param MINRequest app端上传的文件
  150. * @param fileType 文件类型
  151. * @param size 缓冲区 默认512,大文件需要手动修改
  152. * @return
  153. * @throws MINBusinessException
  154. * @throws BusinessCodeException
  155. */
  156. public Map<String, Object> uploadFile(MINHttpServletRequestContext MINRequest, String fileType, int size,String channel) throws MINBusinessException,BusinessCodeException;
  157. /**
  158. * 获取当前登录会员所属机构
  159. * @param session
  160. * @return
  161. * @throws MINBusinessException
  162. */
  163. public String getUserBranchId(MINSession session) throws MINBusinessException;
  164. /**
  165. * 获取序列值
  166. * @param name
  167. * @return
  168. * @throws MINBusinessException
  169. * @throws BusinessCodeException
  170. */
  171. public String getSequence(String name)throws MINBusinessException,BusinessCodeException;
  172. /**
  173. * 通过客户号的获取安装工编号
  174. * @return
  175. * @throws MINBusinessException
  176. */
  177. public String getIdentityNo(MINSession session) throws MINBusinessException;
  178. /**
  179. * 获取机构地址 省+市+区
  180. * @param province
  181. * @param city
  182. * @param area
  183. * @return
  184. * @throws MINBusinessException
  185. */
  186. public String getAddress(String brhid) throws MINBusinessException;
  187. /**
  188. * 发送短信验证码
  189. * @param mobile 手机号
  190. * @param content 短信内容
  191. * @param sendFlag 是否发送true 发送 false不发送
  192. * @return
  193. * @throws MINBusinessException
  194. */
  195. public String[] sendSms(String mobile, String content, boolean sendFlag) throws MINBusinessException;
  196. /**
  197. * 检查当前角色是否有权限
  198. * @param roleId
  199. * @param menuId
  200. * @return
  201. * @throws MINBusinessException
  202. */
  203. public boolean hasMenu(String roleId, String menuId) throws MINBusinessException;
  204. /**
  205. * 根据访问的URL获取bsnCode
  206. * @param url
  207. * @return
  208. * @throws MINBusinessException
  209. */
  210. public String getMenuId(String url) throws MINBusinessException;
  211. public String getSysParStrValueByCode(String sprCode) throws MINBusinessException ;
  212. /**
  213. * 上传文件到本地
  214. * @param file 上传文件
  215. * @param fileType 文件类型,用于区分文件路径上传
  216. * @param size 缓冲区 默认512,大文件需要手动修改
  217. * @param renameFlag 是否重命名
  218. * @return
  219. * @throws MINBusinessException
  220. * @throws BusinessCodeException
  221. */
  222. // public Map<String, Object> uploadFile(FileItem file,String fileType,int size,boolean renameFlag) throws MINBusinessException,BusinessCodeException;
  223. }