Explorar o código

app代码提交

liujiankang %!s(int64=7) %!d(string=hai) anos
pai
achega
4b16dd584a
Modificáronse 50 ficheiros con 2034 adicións e 0 borrados
  1. 27 0
      iamberry-app-interface/.classpath
  2. 36 0
      iamberry-app-interface/.project
  3. 4 0
      iamberry-app-interface/.settings/org.eclipse.core.resources.prefs
  4. 13 0
      iamberry-app-interface/.settings/org.eclipse.jdt.core.prefs
  5. 4 0
      iamberry-app-interface/.settings/org.eclipse.m2e.core.prefs
  6. 5 0
      iamberry-app-interface/.settings/org.eclipse.wst.common.component
  7. 5 0
      iamberry-app-interface/.settings/org.eclipse.wst.common.project.facet.core.xml
  8. 2 0
      iamberry-app-interface/.settings/org.eclipse.wst.validation.prefs
  9. 1 0
      iamberry-app-interface/.svn/entries
  10. 1 0
      iamberry-app-interface/.svn/format
  11. 4 0
      iamberry-app-interface/.svn/pristine/0d/0d78a989c585aac6e6244dedcef06df92d4ea31b.svn-base
  12. 36 0
      iamberry-app-interface/.svn/pristine/2a/2abc7be34b1f7dc69b3330003d9dc67eb858ebc0.svn-base
  13. 156 0
      iamberry-app-interface/.svn/pristine/31/3182fc333c901b273da9b3752bd5f835ee9db5fb.svn-base
  14. 128 0
      iamberry-app-interface/.svn/pristine/36/3689734c943ceaec6420a663d7d72d2614ed1ca7.svn-base
  15. 5 0
      iamberry-app-interface/.svn/pristine/51/51c4dfb689177324a5a9f682d95cb5bd34ac43cb.svn-base
  16. 48 0
      iamberry-app-interface/.svn/pristine/52/5287eb591b125e4f3f19dd20bac6cbebbf8f6b57.svn-base
  17. 152 0
      iamberry-app-interface/.svn/pristine/53/539a3bb25ae5754fa89d9d3c1ecf9f96abdbccd8.svn-base
  18. 22 0
      iamberry-app-interface/.svn/pristine/6d/6d9374818d82ed22fe1a67aaa0cc146b78e928e9.svn-base
  19. 85 0
      iamberry-app-interface/.svn/pristine/75/75ed92be2859e12904b2642214c1665b50e506e3.svn-base
  20. 154 0
      iamberry-app-interface/.svn/pristine/8c/8ce62e72b8fb39592b5731474a8138d9afc2bf39.svn-base
  21. 13 0
      iamberry-app-interface/.svn/pristine/99/991cbb72d18bc0c247162288f2252af39ce79d64.svn-base
  22. 36 0
      iamberry-app-interface/.svn/pristine/9a/9a289fce4b68a9293030ab3d6351fce8cbbc56fd.svn-base
  23. 4 0
      iamberry-app-interface/.svn/pristine/a1/a112be21c325d37ebc17baafd40c0386b5d09df1.svn-base
  24. 158 0
      iamberry-app-interface/.svn/pristine/a6/a627e05f8c6b0a318ab935661c7bdab435f40d80.svn-base
  25. 25 0
      iamberry-app-interface/.svn/pristine/b5/b5eaac664f8dc8d41569de39d82f026cbbb89b4f.svn-base
  26. 27 0
      iamberry-app-interface/.svn/pristine/bf/bf1ebc9bf29fd3c4d7640c63431f45d4d35108d0.svn-base
  27. 73 0
      iamberry-app-interface/.svn/pristine/c6/c6cd0460a3f4388ac1b40e73db69b9473bfbc0dd.svn-base
  28. 48 0
      iamberry-app-interface/.svn/pristine/c8/c857dc31e76c4c11701d466d2f91539109723952.svn-base
  29. 6 0
      iamberry-app-interface/.svn/pristine/d8/d81b5657d129199e9f46456c0bc208f09734ce3c.svn-base
  30. 149 0
      iamberry-app-interface/.svn/pristine/e2/e2363b77f62805f9e0f8edff4d25b91411fd14e6.svn-base
  31. 31 0
      iamberry-app-interface/.svn/pristine/ed/ed4d778e487acae74224b5724e4868d4af0b1533.svn-base
  32. BIN=BIN
      iamberry-app-interface/.svn/wc.db
  33. 25 0
      iamberry-app-interface/pom.xml
  34. 48 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/CodeService.java
  35. 22 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/LogService.java
  36. 73 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/MachineService.java
  37. 85 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/MessageService.java
  38. 158 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/MilkService.java
  39. 154 0
      iamberry-app-interface/src/main/java/com/iamberry/app/face/UserService.java
  40. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/CodeService.class
  41. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/LogService.class
  42. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/MachineService.class
  43. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/MessageService.class
  44. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/MilkService.class
  45. BIN=BIN
      iamberry-app-interface/target/classes/com/iamberry/app/face/UserService.class
  46. BIN=BIN
      iamberry-app-interface/target/iamberry-app-interface-1.0.0.jar
  47. 5 0
      iamberry-app-interface/target/maven-archiver/pom.properties
  48. 0 0
      iamberry-app-interface/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst
  49. 6 0
      iamberry-app-interface/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst
  50. 0 0
      iamberry-app-interface/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst

+ 27 - 0
iamberry-app-interface/.classpath

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/jdk1.8.0_101">
+		<attributes>
+			<attribute name="owner.project.facets" value="java"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 36 - 0
iamberry-app-interface/.project

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>iamberry-app-interface</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+	</natures>
+</projectDescription>

+ 4 - 0
iamberry-app-interface/.settings/org.eclipse.core.resources.prefs

@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/test/java=UTF-8
+encoding/<project>=UTF-8

+ 13 - 0
iamberry-app-interface/.settings/org.eclipse.jdt.core.prefs

@@ -0,0 +1,13 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.5
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.5

+ 4 - 0
iamberry-app-interface/.settings/org.eclipse.m2e.core.prefs

@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

+ 5 - 0
iamberry-app-interface/.settings/org.eclipse.wst.common.component

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="iamberry-app-interface">
+        <wb-resource deploy-path="/" source-path="/src/main/java"/>
+    </wb-module>
+</project-modules>

+ 5 - 0
iamberry-app-interface/.settings/org.eclipse.wst.common.project.facet.core.xml

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="jst.utility" version="1.0"/>
+  <installed facet="java" version="1.5"/>
+</faceted-project>

+ 2 - 0
iamberry-app-interface/.settings/org.eclipse.wst.validation.prefs

@@ -0,0 +1,2 @@
+disabled=06target
+eclipse.preferences.version=1

+ 1 - 0
iamberry-app-interface/.svn/entries

@@ -0,0 +1 @@
+12

+ 1 - 0
iamberry-app-interface/.svn/format

@@ -0,0 +1 @@
+12

+ 4 - 0
iamberry-app-interface/.svn/pristine/0d/0d78a989c585aac6e6244dedcef06df92d4ea31b.svn-base

@@ -0,0 +1,4 @@
+eclipse.preferences.version=1
+encoding//src/main/java=UTF-8
+encoding//src/test/java=UTF-8
+encoding/<project>=UTF-8

+ 36 - 0
iamberry-app-interface/.svn/pristine/2a/2abc7be34b1f7dc69b3330003d9dc67eb858ebc0.svn-base

@@ -0,0 +1,36 @@
+package com.iamberry.app.face;
+
+import com.iamberry.wechat.tools.ResponseJson;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年11月1日
+ * @explain	验证码业务接口
+ */
+public interface CodeService {
+
+	/**
+	 * 发送短信验证码接口
+	 * @param phone
+	 * @return
+	 */
+	public ResponseJson sendCode(String phone, int codeScenario);
+	
+	/**
+	 * 根据手机号码、短信验证码、使用场景,校验是否正确
+	 * @param phone
+	 * @param code
+	 * @param codeScenario
+	 * @return
+	 * 		returnCode : 
+	 * 			404	没有找到此用户的发送记录
+	 * 			403	验证码无效,已经超时
+	 * 			405	验证码错误
+	 * 			200	校验通过
+	 */
+	public ResponseJson validCode(String phone, String code, int codeScenario);
+	
+}

+ 156 - 0
iamberry-app-interface/.svn/pristine/31/3182fc333c901b273da9b3752bd5f835ee9db5fb.svn-base

@@ -0,0 +1,156 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.iamberry.app.core.dto.RemoteIpInfoDTO;
+import com.iamberry.app.core.dto.UserDTO;
+import com.iamberry.app.core.entity.User;
+
+/**
+ * UserService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:29
+ */
+
+public interface UserService {
+	
+	
+	public User validateUserToken(String token);
+
+	/**
+	 * register
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param password
+	 * @return User Information
+	 */
+	public User register(String phone, String password, String ip) ;
+
+	/**
+	 * thirdPartBindingPhone
+	 *
+	 * @param phone
+	 * @param openId
+	 * @return
+	 */
+	public User thirdPartBindingPhone(String phone, String openId) ;
+	/**
+	 * findById
+	 *
+	 * @param id
+	 * @return User
+	 */
+	public User findById(Long id);
+
+	/**
+	 * login
+	 *
+	 * @param phone
+	 * @param password
+	 * @param userAgent
+	 * @return
+	 */
+	public Object login(String phone, String password) ;
+
+	/**
+	 * thirdPartLogin
+	 *
+	 * @param openId
+	 * @param extType
+	 * @param extName
+	 * @param extPicture
+	 * @return
+	 */
+	public User thirdPartLogin(String openId, String extType, String extName, String extPicture, String ip) ;
+
+	/**
+	 * updateUserInfo
+	 *
+	 * @param user
+	 * @param token
+	 * @return
+	 */
+	public User updateUserInfo(User user, String token) ;
+
+	/**
+	 * updateDisplayPicture
+	 *
+	 * @author Moon Cheng
+	 * @param base64
+	 * @param token
+	 * @return
+	 */
+	public String updateDisplayPicture(String base64, String token) ;
+	/**
+	 * changePhone
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param token
+	 * @return
+	 */
+	public User changePhone(String phone, String token) ;
+	/**
+	 * resetPassWord
+	 *
+	 * @param oldPassword
+	 * @param newPassword
+	 * @param token
+	 * @return
+	 */
+	public int changePassword(String oldPassword, String newPassword, String token) ;
+	/**
+	 * changePassWord
+	 *
+	 * @param username,
+	 *            newPassword
+	 * @param session
+	 * @return int
+	 */
+	public int resetPassWord(String username, String newPassword) ;
+
+	public UserDTO tuyaConnect(User user) ;
+
+	/**
+	 * getStartPage
+	 *
+	 * @return String
+	 */
+	public String getStartPage() ;
+	/**
+	 * getLocation
+	 *
+	 * @param ip
+	 * @return String
+	 */
+	public RemoteIpInfoDTO getLocation(String ip) ;
+
+	/**
+	 * getApkVersion
+	 *
+	 * @return
+	 */
+	public String getApkVersion();
+	
+	/**
+	 * selectUserAvator
+	 *
+	 * @param id
+	 * @return String
+	 */
+	public String selectUserAvator(Long id);
+	
+	/**
+	 * selectUserByUsername
+	 *
+	 * @param username
+	 * @return User Information
+	 */
+	public User selectUserByUsername(String username);
+	
+	public List<User> getAll(int start, int end);
+}

+ 128 - 0
iamberry-app-interface/.svn/pristine/36/3689734c943ceaec6420a663d7d72d2614ed1ca7.svn-base

@@ -0,0 +1,128 @@
+package com.iamberry.app.face;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.iamberry.app.core.dto.RecordCountInfoDTO;
+import com.iamberry.app.core.dto.RecordDTO;
+import com.iamberry.app.core.entity.MilkImages;
+import com.iamberry.app.core.entity.MilkMakingRecord;
+import com.iamberry.app.core.entity.MilkPowderInfo;
+
+/**
+ * MilkService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:10
+ */
+
+public interface MilkService {
+
+	/**
+	 * setMilkMakingRecord
+	 *
+	 * @param makingRecord
+	 * @param token
+	 * @param recordId
+	 * @return
+	 */
+	public MilkMakingRecord setMilkMakingRecord(MilkMakingRecord makingRecord, String token);
+
+	/**
+	 * searchUserRecordsBytime
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @param startTime
+	 * @param endTime
+	 * @return Milk Making Record List
+	 */
+	public Map<String, List<RecordDTO>> searchUserRecordsByTime(Long userId, String dateStatus, String chosenDate,
+			String machineMac) ;
+	/**
+	 * searchUserRecordById
+	 *
+	 * @author Moon Cheng
+	 * @param recordId
+	 * @return Milk Making Record Information
+	 */
+	public MilkMakingRecord searchUserRecordById(Long recordId);
+
+	/**
+	 * getTotalMilkVolumeMadeByUser
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @return
+	 */
+	public RecordCountInfoDTO getTotalMilkVolumeMadeByUser(Long userId) ;
+
+	/**
+	 * setMilkPowderInfo
+	 *
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo setMilkPowderInfo(MilkPowderInfo entity, String token) ;
+	/**
+	 * searchMilkPowderInfoByBarCode
+	 *
+	 * @author Moon Cheng
+	 * @param barcode
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo searchMilkPowderInfoByBarCode(String barcode) ;
+	/**
+	 * searchMilkPowderInfosByBrand
+	 *
+	 * @author Moon Cheng, Yin
+	 * @param brand
+	 * @return Milk Powder List
+	 */
+	public Map<String, List<String>> searchMilkPowderInfosByBrand(String brand) ;
+
+	/**
+	 * searchMilkPowderBrand
+	 *
+	 * @return Brand List
+	 */
+	public List<String> searchMilkPowderBrand() ;
+
+	/**
+	 * searchMilkInfoByBrandSeriesLevel
+	 *
+	 * @param brand
+	 * @param series
+	 * @param level
+	 * @return
+	 */
+	public MilkPowderInfo searchMilkInfoByBrandSeriesLevel(String brand, String series, String level);
+
+	// =====================================TuyaHistoryData======================================
+	/**
+	 * getLastRecordDate
+	 *
+	 * @return
+	 */
+	public Date getLastRecordDate() ;
+	/**
+	 * addRecordData
+	 *
+	 * @param devId
+	 * @param value
+	 * @param time
+	 */
+	public void addRecordData(String devId, String value, Long time, Long userID) ;
+	
+	/**
+	 * setMilkImages
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public void setMilkImages(MilkImages images) ;
+}

+ 5 - 0
iamberry-app-interface/.svn/pristine/51/51c4dfb689177324a5a9f682d95cb5bd34ac43cb.svn-base

@@ -0,0 +1,5 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<faceted-project>
+  <installed facet="java" version="1.7"/>
+  <installed facet="jst.utility" version="1.0"/>
+</faceted-project>

+ 48 - 0
iamberry-app-interface/.svn/pristine/52/5287eb591b125e4f3f19dd20bac6cbebbf8f6b57.svn-base

@@ -0,0 +1,48 @@
+package com.iamberry.app.face;
+
+import com.iamberry.app.config.Response;
+import com.iamberry.wechat.tools.ResponseJson;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年11月1日
+ * @explain	验证码业务接口
+ */
+public interface CodeService {
+
+	/**
+	 * 发送短信验证码接口
+	 * @param phone
+	 * @return
+	 */
+	public ResponseJson sendCode(String phone, int codeScenario);
+	
+	/**
+	 * 根据手机号码、短信验证码、使用场景,校验是否正确
+	 * @param phone
+	 * @param code
+	 * @param codeScenario
+	 * @return
+	 * 		returnCode : 
+	 * 			404	没有找到此用户的发送记录
+	 * 			403	验证码无效,已经超时
+	 * 			405	验证码错误
+	 * 			200	校验通过
+	 */
+	public ResponseJson validCode(String phone, String code, int codeScenario);
+	
+	/**
+	 * 放轰炸原则:
+	 * 	1、每个手机号码,每60秒只能发送1次!<br>
+	 * 	2、每个手机号码,每小时只能发送三次!<br>
+	 *  3、每个手机号码,每天只能发送10次!<br>
+	 * @param phone
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月5日
+	 */
+	//public Response interval(String phone);
+}

+ 152 - 0
iamberry-app-interface/.svn/pristine/53/539a3bb25ae5754fa89d9d3c1ecf9f96abdbccd8.svn-base

@@ -0,0 +1,152 @@
+package com.iamberry.app.face;
+
+import javax.servlet.http.HttpServletRequest;
+
+import com.iamberry.app.core.dto.RemoteIpInfoDTO;
+import com.iamberry.app.core.dto.UserDTO;
+import com.iamberry.app.core.entity.User;
+
+/**
+ * UserService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:29
+ */
+
+public interface UserService {
+	
+	
+	public User validateUserToken(String token);
+
+	/**
+	 * register
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param password
+	 * @return User Information
+	 */
+	public User register(String phone, String password, String ip) ;
+
+	/**
+	 * thirdPartBindingPhone
+	 *
+	 * @param phone
+	 * @param openId
+	 * @return
+	 */
+	public User thirdPartBindingPhone(String phone, String openId) ;
+	/**
+	 * findById
+	 *
+	 * @param id
+	 * @return User
+	 */
+	public User findById(Long id);
+
+	/**
+	 * login
+	 *
+	 * @param phone
+	 * @param password
+	 * @param userAgent
+	 * @return
+	 */
+	public Object login(String phone, String password) ;
+
+	/**
+	 * thirdPartLogin
+	 *
+	 * @param openId
+	 * @param extType
+	 * @param extName
+	 * @param extPicture
+	 * @return
+	 */
+	public User thirdPartLogin(String openId, String extType, String extName, String extPicture, String ip) ;
+
+	/**
+	 * updateUserInfo
+	 *
+	 * @param user
+	 * @param token
+	 * @return
+	 */
+	public User updateUserInfo(User user, String token) ;
+
+	/**
+	 * updateDisplayPicture
+	 *
+	 * @author Moon Cheng
+	 * @param base64
+	 * @param token
+	 * @return
+	 */
+	public String updateDisplayPicture(String base64, String token) ;
+	/**
+	 * changePhone
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param token
+	 * @return
+	 */
+	public User changePhone(String phone, String token) ;
+	/**
+	 * resetPassWord
+	 *
+	 * @param oldPassword
+	 * @param newPassword
+	 * @param token
+	 * @return
+	 */
+	public int changePassword(String oldPassword, String newPassword, String token) ;
+	/**
+	 * changePassWord
+	 *
+	 * @param username,
+	 *            newPassword
+	 * @param session
+	 * @return int
+	 */
+	public int resetPassWord(String username, String newPassword) ;
+
+	public UserDTO tuyaConnect(User user) ;
+
+	/**
+	 * getStartPage
+	 *
+	 * @return String
+	 */
+	public String getStartPage() ;
+	/**
+	 * getLocation
+	 *
+	 * @param ip
+	 * @return String
+	 */
+	public RemoteIpInfoDTO getLocation(String ip) ;
+
+	/**
+	 * getApkVersion
+	 *
+	 * @return
+	 */
+	public String getApkVersion();
+	
+	/**
+	 * selectUserAvator
+	 *
+	 * @param id
+	 * @return String
+	 */
+	public String selectUserAvator(Long id);
+	
+	/**
+	 * selectUserByUsername
+	 *
+	 * @param username
+	 * @return User Information
+	 */
+	public User selectUserByUsername(String username);
+}

+ 22 - 0
iamberry-app-interface/.svn/pristine/6d/6d9374818d82ed22fe1a67aaa0cc146b78e928e9.svn-base

@@ -0,0 +1,22 @@
+package com.iamberry.app.face;
+
+import com.iamberry.app.core.entity.SysLog;
+
+/**
+ * LogService
+ * 
+ * @author Moon Cheng
+ * @date 2016年3月23日 下午2:34:45
+ */
+
+public interface LogService  {
+
+	/**
+	 * saveSystemLog
+	 * 
+	 * @author Moon Cheng
+	 * @param log
+	 * @return
+	 */
+	public SysLog saveSystemLog(SysLog log) ;
+}

+ 85 - 0
iamberry-app-interface/.svn/pristine/75/75ed92be2859e12904b2642214c1665b50e506e3.svn-base

@@ -0,0 +1,85 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.entity.Message;
+import com.iamberry.app.core.entity.User;
+import com.iamberry.app.core.serch.SerchParam;
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * LogService
+ * 
+ * @author LC
+ * @date 2016年9月13日16:34:32
+ */
+
+public interface MessageService  {
+
+	/**
+	 * 获取用户列表信息
+	 * @return
+	 */
+	public List<User> selectUser(PageBean page);
+	
+	/**
+	 * 获取用户总条数
+	 * @return
+	 */
+	public int selectUserCount(SerchParam params);
+
+	
+	/**
+	 * 修改一条消息
+	 * @return 影响的行数
+	 */
+	public int updateMessage(Message message);
+	
+	/**
+	 * 添加一条消息
+	 * @return 影响的行数
+	 */
+	public int insertMessage(Message message);
+	
+	/**
+	 * 获取符合条件所有消息的总条数
+	 * @return 所有的消息条数
+	 */
+	public int selectMessageCount(SerchParam params);
+	
+	/**
+	 * 获取符合条件所有消息
+	 * @return 所有的消息
+	 */
+	public List<Message> selectMessageRecoreds(PageBean page);
+
+	
+	
+	/**
+	 * 获取系统的所有消息	(user为空的)
+	 * @param userid 用户id
+	 * @return 用户下所有的消息
+	 */
+	public List<Message> selectSysMessageRecoreds();
+	
+	/**
+	 * 根据信息id获取信息实体类
+	 * @param id 信息id
+	 * @return 信息实体类
+	 */
+	public Message selectUserMessageByid( Long id);
+	/**
+	 * 根据用户id获取该用户的所有消息
+	 * @param userid 用户id
+	 * @return 用户下所有的消息
+	 */
+	public List<Message> selectUserMessageRecoreds(String token);
+	/**
+	 * 获取用户消息
+	 * @param userid 用户id 
+	 * @param isread 1已读,2 未读
+	 * @return 用户消息集合
+	 */
+	public int selectUserMessageByisread(String token, Long isread);
+
+}

+ 154 - 0
iamberry-app-interface/.svn/pristine/8c/8ce62e72b8fb39592b5731474a8138d9afc2bf39.svn-base

@@ -0,0 +1,154 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.dto.RemoteIpInfoDTO;
+import com.iamberry.app.core.dto.UserDTO;
+import com.iamberry.app.core.entity.User;
+
+/**
+ * UserService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:29
+ */
+
+public interface UserService {
+	
+	
+	public User validateUserToken(String token);
+
+	/**
+	 * register
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param password
+	 * @return User Information
+	 */
+	public User register(String phone, String password, String ip) ;
+
+	/**
+	 * thirdPartBindingPhone
+	 *
+	 * @param phone
+	 * @param openId
+	 * @return
+	 */
+	public User thirdPartBindingPhone(String phone, String openId) ;
+	/**
+	 * findById
+	 *
+	 * @param id
+	 * @return User
+	 */
+	public User findById(Long id);
+
+	/**
+	 * login
+	 *
+	 * @param phone
+	 * @param password
+	 * @param userAgent
+	 * @return
+	 */
+	public Object login(String phone, String password) ;
+
+	/**
+	 * thirdPartLogin
+	 *
+	 * @param openId
+	 * @param extType
+	 * @param extName
+	 * @param extPicture
+	 * @return
+	 */
+	public User thirdPartLogin(String openId, String extType, String extName, String extPicture, String ip) ;
+
+	/**
+	 * updateUserInfo
+	 *
+	 * @param user
+	 * @param token
+	 * @return
+	 */
+	public User updateUserInfo(User user, String token) ;
+
+	/**
+	 * updateDisplayPicture
+	 *
+	 * @author Moon Cheng
+	 * @param base64
+	 * @param token
+	 * @return
+	 */
+	public String updateDisplayPicture(String base64, String token) ;
+	/**
+	 * changePhone
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param token
+	 * @return
+	 */
+	public User changePhone(String phone, String token) ;
+	/**
+	 * resetPassWord
+	 *
+	 * @param oldPassword
+	 * @param newPassword
+	 * @param token
+	 * @return
+	 */
+	public int changePassword(String oldPassword, String newPassword, String token) ;
+	/**
+	 * changePassWord
+	 *
+	 * @param username,
+	 *            newPassword
+	 * @param session
+	 * @return int
+	 */
+	public int resetPassWord(String username, String newPassword) ;
+
+	public UserDTO tuyaConnect(User user) ;
+
+	/**
+	 * getStartPage
+	 *
+	 * @return String
+	 */
+	public String getStartPage() ;
+	/**
+	 * getLocation
+	 *
+	 * @param ip
+	 * @return String
+	 */
+	public RemoteIpInfoDTO getLocation(String ip) ;
+
+	/**
+	 * getApkVersion
+	 *
+	 * @return
+	 */
+	public String getApkVersion();
+	
+	/**
+	 * selectUserAvator
+	 *
+	 * @param id
+	 * @return String
+	 */
+	public String selectUserAvator(Long id);
+	
+	/**
+	 * selectUserByUsername
+	 *
+	 * @param username
+	 * @return User Information
+	 */
+	public User selectUserByUsername(String username);
+	
+	public List<User> getAll(int start, int end);
+}

+ 13 - 0
iamberry-app-interface/.svn/pristine/99/991cbb72d18bc0c247162288f2252af39ce79d64.svn-base

@@ -0,0 +1,13 @@
+eclipse.preferences.version=1
+org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
+org.eclipse.jdt.core.compiler.codegen.methodParameters=do not generate
+org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
+org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
+org.eclipse.jdt.core.compiler.compliance=1.7
+org.eclipse.jdt.core.compiler.debug.lineNumber=generate
+org.eclipse.jdt.core.compiler.debug.localVariable=generate
+org.eclipse.jdt.core.compiler.debug.sourceFile=generate
+org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
+org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
+org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
+org.eclipse.jdt.core.compiler.source=1.7

+ 36 - 0
iamberry-app-interface/.svn/pristine/9a/9a289fce4b68a9293030ab3d6351fce8cbbc56fd.svn-base

@@ -0,0 +1,36 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<projectDescription>
+	<name>iamberry-app-interface</name>
+	<comment></comment>
+	<projects>
+	</projects>
+	<buildSpec>
+		<buildCommand>
+			<name>org.eclipse.wst.common.project.facet.core.builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.jdt.core.javabuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.m2e.core.maven2Builder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+		<buildCommand>
+			<name>org.eclipse.wst.validation.validationbuilder</name>
+			<arguments>
+			</arguments>
+		</buildCommand>
+	</buildSpec>
+	<natures>
+		<nature>org.eclipse.jem.workbench.JavaEMFNature</nature>
+		<nature>org.eclipse.wst.common.modulecore.ModuleCoreNature</nature>
+		<nature>org.eclipse.jdt.core.javanature</nature>
+		<nature>org.eclipse.m2e.core.maven2Nature</nature>
+		<nature>org.eclipse.wst.common.project.facet.core.nature</nature>
+	</natures>
+</projectDescription>

+ 4 - 0
iamberry-app-interface/.svn/pristine/a1/a112be21c325d37ebc17baafd40c0386b5d09df1.svn-base

@@ -0,0 +1,4 @@
+activeProfiles=
+eclipse.preferences.version=1
+resolveWorkspaceProjects=true
+version=1

+ 158 - 0
iamberry-app-interface/.svn/pristine/a6/a627e05f8c6b0a318ab935661c7bdab435f40d80.svn-base

@@ -0,0 +1,158 @@
+package com.iamberry.app.face;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.iamberry.app.core.dto.RecordCountInfoDTO;
+import com.iamberry.app.core.dto.RecordDTO;
+import com.iamberry.app.core.entity.MilkDatetimeValue;
+import com.iamberry.app.core.entity.MilkImages;
+import com.iamberry.app.core.entity.MilkMakingRecord;
+import com.iamberry.app.core.entity.MilkPowderInfo;
+
+/**
+ * MilkService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:10
+ */
+
+public interface MilkService {
+
+	/**
+	 * setMilkMakingRecord
+	 *
+	 * @param makingRecord
+	 * @param token
+	 * @param recordId
+	 * @return
+	 */
+	public MilkMakingRecord setMilkMakingRecord(MilkMakingRecord makingRecord, String token);
+
+	/**
+	 * searchUserRecordsBytime
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @param startTime
+	 * @param endTime
+	 * @return Milk Making Record List
+	 */
+	public Map<String, List<RecordDTO>> searchUserRecordsByTime(Long userId, String dateStatus, String chosenDate,
+			String machineMac) ;
+	/**
+	 * searchUserRecordById
+	 *
+	 * @author Moon Cheng
+	 * @param recordId
+	 * @return Milk Making Record Information
+	 */
+	public MilkMakingRecord searchUserRecordById(Long recordId);
+
+	/**
+	 * getTotalMilkVolumeMadeByUser
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @return
+	 */
+	public RecordCountInfoDTO getTotalMilkVolumeMadeByUser(Long userId) ;
+
+	/**
+	 * setMilkPowderInfo
+	 *
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo setMilkPowderInfo(MilkPowderInfo entity, String token) ;
+	/**
+	 * searchMilkPowderInfoByBarCode
+	 *
+	 * @author Moon Cheng
+	 * @param barcode
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo searchMilkPowderInfoByBarCode(String barcode) ;
+	/**
+	 * searchMilkPowderInfosByBrand
+	 *
+	 * @author Moon Cheng, Yin
+	 * @param brand
+	 * @return Milk Powder List
+	 */
+	public Map<String, List<String>> searchMilkPowderInfosByBrand(String brand) ;
+
+	/**
+	 * searchMilkPowderBrand
+	 *
+	 * @return Brand List
+	 */
+	public List<String> searchMilkPowderBrand() ;
+
+	/**
+	 * searchMilkInfoByBrandSeriesLevel
+	 *
+	 * @param brand
+	 * @param series
+	 * @param level
+	 * @return
+	 */
+	public MilkPowderInfo searchMilkInfoByBrandSeriesLevel(String brand, String series, String level);
+
+	// =====================================TuyaHistoryData======================================
+	/**
+	 * getLastRecordDate
+	 *
+	 * @return
+	 */
+	public Date getLastRecordDate() ;
+	/**
+	 * addRecordData
+	 *
+	 * @param devId
+	 * @param value
+	 * @param time
+	 */
+	public void addRecordData(String devId, String value, Long time, Long userID) ;
+	
+	/**
+	 * setMilkImages
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public void setMilkImages(MilkImages images) ;
+	
+	/**
+	 * 获取冲奶记录,根据时间统计某一天
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	//public List<MilkDatetimeValue> getMilkRecordByTime(String mac, String time);
+	
+	/**
+	 * 获取冲奶记录,根据日期统计某个月
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	//public List<MilkDatetimeValue> getMilkRecordByDate(String mac, String date);
+	
+	/**
+	 * 通过barcode查询奶粉信息
+	 *
+	 * @author Moon Cheng
+	 * @param barCode
+	 * @return
+	 */
+	public MilkPowderInfo selectMilkPowderByBar(String barcode);
+}

+ 25 - 0
iamberry-app-interface/.svn/pristine/b5/b5eaac664f8dc8d41569de39d82f026cbbb89b4f.svn-base

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.iamberry</groupId>
+    <artifactId>iamberry-parent</artifactId>
+    <version>1.0.0</version>
+  </parent>
+  
+  <artifactId>iamberry-app-interface</artifactId>
+ 
+  <dependencies>
+  	<dependency>
+  		<groupId>com.iamberry</groupId>
+  		<artifactId>iamberry-common-core</artifactId>
+  		<version>1.0.0</version>
+  	</dependency>
+  	<dependency>
+  		<groupId>com.iamberry</groupId>
+  		<artifactId>iamberry-common-tool</artifactId>
+  		<version>1.0.0</version>
+  	</dependency>
+  </dependencies>
+</project>

+ 27 - 0
iamberry-app-interface/.svn/pristine/bf/bf1ebc9bf29fd3c4d7640c63431f45d4d35108d0.svn-base

@@ -0,0 +1,27 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<classpath>
+	<classpathentry kind="src" output="target/classes" path="src/main/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="src" output="target/test-classes" path="src/test/java">
+		<attributes>
+			<attribute name="optional" value="true"/>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/J2SE-1.5">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
+		<attributes>
+			<attribute name="maven.pomderived" value="true"/>
+			<attribute name="org.eclipse.jst.component.nondependency" value=""/>
+		</attributes>
+	</classpathentry>
+	<classpathentry kind="output" path="target/classes"/>
+</classpath>

+ 73 - 0
iamberry-app-interface/.svn/pristine/c6/c6cd0460a3f4388ac1b40e73db69b9473bfbc0dd.svn-base

@@ -0,0 +1,73 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.entity.Machine;
+
+/**
+ * MachineService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 下午12:27:32
+ */
+
+public interface MachineService {
+
+	/**
+	 * setMachine
+	 *
+	 * @author Moon Cheng
+	 * @param machine
+	 * @param token
+	 * @return Machine Information
+	 */
+	public Machine setMachine(Machine machine, String token, String ip) ;
+
+	/**
+	 * 根据机器id 修改个人机器状态,创建时间改为当前时间
+	 * @param status,
+	 *            id
+	 */
+	public int updateMachineStatus(Long machineId, String status, String token);
+
+	/**
+	 *	根据id 修改一台机器的位置信息
+	 * @param machineId
+	 * @param location
+	 * @param token
+	 */
+	public int updateMachineLocation(Long machineId, String location, String token) ;
+
+	/**
+	 * 	按用户,查询所有机器
+	 *
+	 * @author Moon Cheng
+	 * @param owner
+	 * @param token
+	 * @return
+	 */
+	public List<Machine> searchMachineByOwner(Long owner, String token) ;
+	/**
+	 * 	根据id 查询一台机器
+	 *
+	 * @param machineId
+	 * @param token
+	 * @return
+	 */
+	public Machine searchMachineById(Long machineId, String token);
+
+	/**
+	 * 根据机器码 修改个人机器状态
+	 *
+	 * @param status
+	 */
+	public void updateStatus(String status) ;
+	
+
+	/**
+	 * 根据机器的ID,查询最近的一个用户ID
+	 * @param devId
+	 * @return
+	 */
+	public Long selectUserIDByDevId(String devId);
+}

+ 48 - 0
iamberry-app-interface/.svn/pristine/c8/c857dc31e76c4c11701d466d2f91539109723952.svn-base

@@ -0,0 +1,48 @@
+package com.iamberry.app.face;
+
+import com.iamberry.app.config.Response;
+import com.iamberry.wechat.tools.ResponseJson;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年11月1日
+ * @explain	验证码业务接口
+ */
+public interface CodeService {
+
+	/**
+	 * 发送短信验证码接口
+	 * @param phone
+	 * @return
+	 */
+	public ResponseJson sendCode(String phone, int codeScenario);
+	
+	/**
+	 * 根据手机号码、短信验证码、使用场景,校验是否正确
+	 * @param phone
+	 * @param code
+	 * @param codeScenario
+	 * @return
+	 * 		returnCode : 
+	 * 			404	没有找到此用户的发送记录
+	 * 			403	验证码无效,已经超时
+	 * 			405	验证码错误
+	 * 			200	校验通过
+	 */
+	public ResponseJson validCode(String phone, String code, int codeScenario);
+	
+	/**
+	 * 放轰炸原则:
+	 * 	1、每个手机号码,每60秒只能发送1次!<br>
+	 * 	2、每个手机号码,每小时只能发送三次!<br>
+	 *  3、每个手机号码,每天只能发送10次!<br>
+	 * @param phone
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月5日
+	 */
+	public Response interval(String phone);
+}

+ 6 - 0
iamberry-app-interface/.svn/pristine/d8/d81b5657d129199e9f46456c0bc208f09734ce3c.svn-base

@@ -0,0 +1,6 @@
+<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
+    <wb-module deploy-name="iamberry-app-interface">
+        <wb-resource deploy-path="/" source-path="/src/main/java"/>
+        <wb-resource deploy-path="/" source-path="/src/test/java"/>
+    </wb-module>
+</project-modules>

+ 149 - 0
iamberry-app-interface/.svn/pristine/e2/e2363b77f62805f9e0f8edff4d25b91411fd14e6.svn-base

@@ -0,0 +1,149 @@
+package com.iamberry.app.face;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.iamberry.app.core.dto.RecordCountInfoDTO;
+import com.iamberry.app.core.dto.RecordDTO;
+import com.iamberry.app.core.entity.MilkDatetimeValue;
+import com.iamberry.app.core.entity.MilkImages;
+import com.iamberry.app.core.entity.MilkMakingRecord;
+import com.iamberry.app.core.entity.MilkPowderInfo;
+
+/**
+ * MilkService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:10
+ */
+
+public interface MilkService {
+
+	/**
+	 * setMilkMakingRecord
+	 *
+	 * @param makingRecord
+	 * @param token
+	 * @param recordId
+	 * @return
+	 */
+	public MilkMakingRecord setMilkMakingRecord(MilkMakingRecord makingRecord, String token);
+
+	/**
+	 * searchUserRecordsBytime
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @param startTime
+	 * @param endTime
+	 * @return Milk Making Record List
+	 */
+	public Map<String, List<RecordDTO>> searchUserRecordsByTime(Long userId, String dateStatus, String chosenDate,
+			String machineMac) ;
+	/**
+	 * searchUserRecordById
+	 *
+	 * @author Moon Cheng
+	 * @param recordId
+	 * @return Milk Making Record Information
+	 */
+	public MilkMakingRecord searchUserRecordById(Long recordId);
+
+	/**
+	 * getTotalMilkVolumeMadeByUser
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @return
+	 */
+	public RecordCountInfoDTO getTotalMilkVolumeMadeByUser(Long userId) ;
+
+	/**
+	 * setMilkPowderInfo
+	 *
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo setMilkPowderInfo(MilkPowderInfo entity, String token) ;
+	/**
+	 * searchMilkPowderInfoByBarCode
+	 *
+	 * @author Moon Cheng
+	 * @param barcode
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo searchMilkPowderInfoByBarCode(String barcode) ;
+	/**
+	 * searchMilkPowderInfosByBrand
+	 *
+	 * @author Moon Cheng, Yin
+	 * @param brand
+	 * @return Milk Powder List
+	 */
+	public Map<String, List<String>> searchMilkPowderInfosByBrand(String brand) ;
+
+	/**
+	 * searchMilkPowderBrand
+	 *
+	 * @return Brand List
+	 */
+	public List<String> searchMilkPowderBrand() ;
+
+	/**
+	 * searchMilkInfoByBrandSeriesLevel
+	 *
+	 * @param brand
+	 * @param series
+	 * @param level
+	 * @return
+	 */
+	public MilkPowderInfo searchMilkInfoByBrandSeriesLevel(String brand, String series, String level);
+
+	// =====================================TuyaHistoryData======================================
+	/**
+	 * getLastRecordDate
+	 *
+	 * @return
+	 */
+	public Date getLastRecordDate() ;
+	/**
+	 * addRecordData
+	 *
+	 * @param devId
+	 * @param value
+	 * @param time
+	 */
+	public void addRecordData(String devId, String value, Long time, Long userID) ;
+	
+	/**
+	 * setMilkImages
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public void setMilkImages(MilkImages images) ;
+	
+	/**
+	 * 获取冲奶记录,根据时间统计某一天
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	public List<MilkDatetimeValue> getMilkRecordByTime(String mac, String time);
+	
+	/**
+	 * 获取冲奶记录,根据日期统计某个月
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	public List<MilkDatetimeValue> getMilkRecordByDate(String mac, String date);
+}

+ 31 - 0
iamberry-app-interface/.svn/pristine/ed/ed4d778e487acae74224b5724e4868d4af0b1533.svn-base

@@ -0,0 +1,31 @@
+package com.iamberry.app.face;
+
+import com.iamberry.wechat.tools.ResponseJson;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年11月1日
+ * @explain	验证码业务接口
+ */
+public interface CodeService {
+
+	/**
+	 * 发送短信验证码接口
+	 * @param phone
+	 * @return
+	 */
+	public ResponseJson sendCode(String phone, int codeScenario);
+	
+	/**
+	 * 根据手机号码、短信验证码、使用场景,校验是否正确
+	 * @param phone
+	 * @param code
+	 * @param codeScenario
+	 * @return
+	 */
+	public ResponseJson validCode(String phone, String code, int codeScenario);
+	
+}

BIN=BIN
iamberry-app-interface/.svn/wc.db


+ 25 - 0
iamberry-app-interface/pom.xml

@@ -0,0 +1,25 @@
+<?xml version="1.0"?>
+<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
+    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+  <modelVersion>4.0.0</modelVersion>
+  <parent>
+    <groupId>com.iamberry</groupId>
+    <artifactId>iamberry-parent</artifactId>
+    <version>1.0.0</version>
+  </parent>
+  
+  <artifactId>iamberry-app-interface</artifactId>
+ 
+  <dependencies>
+  	<dependency>
+  		<groupId>com.iamberry</groupId>
+  		<artifactId>iamberry-common-core</artifactId>
+  		<version>1.0.0</version>
+  	</dependency>
+  	<dependency>
+  		<groupId>com.iamberry</groupId>
+  		<artifactId>iamberry-common-tool</artifactId>
+  		<version>1.0.0</version>
+  	</dependency>
+  </dependencies>
+</project>

+ 48 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/CodeService.java

@@ -0,0 +1,48 @@
+package com.iamberry.app.face;
+
+import com.iamberry.app.config.Response;
+import com.iamberry.wechat.tools.ResponseJson;
+
+/**
+ * @company	深圳爱贝源科技有限公司
+ * @website www.iamberry.com
+ * @author 	献
+ * @tel		18271840547
+ * @date	2016年11月1日
+ * @explain	验证码业务接口
+ */
+public interface CodeService {
+
+	/**
+	 * 发送短信验证码接口
+	 * @param phone
+	 * @return
+	 */
+	public ResponseJson sendCode(String phone, int codeScenario);
+	
+	/**
+	 * 根据手机号码、短信验证码、使用场景,校验是否正确
+	 * @param phone
+	 * @param code
+	 * @param codeScenario
+	 * @return
+	 * 		returnCode : 
+	 * 			404	没有找到此用户的发送记录
+	 * 			403	验证码无效,已经超时
+	 * 			405	验证码错误
+	 * 			200	校验通过
+	 */
+	public ResponseJson validCode(String phone, String code, int codeScenario);
+	
+	/**
+	 * 放轰炸原则:
+	 * 	1、每个手机号码,每60秒只能发送1次!<br>
+	 * 	2、每个手机号码,每小时只能发送三次!<br>
+	 *  3、每个手机号码,每天只能发送10次!<br>
+	 * @param phone
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月5日
+	 */
+	//public Response interval(String phone);
+}

+ 22 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/LogService.java

@@ -0,0 +1,22 @@
+package com.iamberry.app.face;
+
+import com.iamberry.app.core.entity.SysLog;
+
+/**
+ * LogService
+ * 
+ * @author Moon Cheng
+ * @date 2016年3月23日 下午2:34:45
+ */
+
+public interface LogService  {
+
+	/**
+	 * saveSystemLog
+	 * 
+	 * @author Moon Cheng
+	 * @param log
+	 * @return
+	 */
+	public SysLog saveSystemLog(SysLog log) ;
+}

+ 73 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/MachineService.java

@@ -0,0 +1,73 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.entity.Machine;
+
+/**
+ * MachineService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 下午12:27:32
+ */
+
+public interface MachineService {
+
+	/**
+	 * setMachine
+	 *
+	 * @author Moon Cheng
+	 * @param machine
+	 * @param token
+	 * @return Machine Information
+	 */
+	public Machine setMachine(Machine machine, String token, String ip) ;
+
+	/**
+	 * 根据机器id 修改个人机器状态,创建时间改为当前时间
+	 * @param status,
+	 *            id
+	 */
+	public int updateMachineStatus(Long machineId, String status, String token);
+
+	/**
+	 *	根据id 修改一台机器的位置信息
+	 * @param machineId
+	 * @param location
+	 * @param token
+	 */
+	public int updateMachineLocation(Long machineId, String location, String token) ;
+
+	/**
+	 * 	按用户,查询所有机器
+	 *
+	 * @author Moon Cheng
+	 * @param owner
+	 * @param token
+	 * @return
+	 */
+	public List<Machine> searchMachineByOwner(Long owner, String token) ;
+	/**
+	 * 	根据id 查询一台机器
+	 *
+	 * @param machineId
+	 * @param token
+	 * @return
+	 */
+	public Machine searchMachineById(Long machineId, String token);
+
+	/**
+	 * 根据机器码 修改个人机器状态
+	 *
+	 * @param status
+	 */
+	public void updateStatus(String status) ;
+	
+
+	/**
+	 * 根据机器的ID,查询最近的一个用户ID
+	 * @param devId
+	 * @return
+	 */
+	public Long selectUserIDByDevId(String devId);
+}

+ 85 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/MessageService.java

@@ -0,0 +1,85 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.entity.Message;
+import com.iamberry.app.core.entity.User;
+import com.iamberry.app.core.serch.SerchParam;
+import com.iamberry.wechat.core.entity.PageBean;
+
+/**
+ * LogService
+ * 
+ * @author LC
+ * @date 2016年9月13日16:34:32
+ */
+
+public interface MessageService  {
+
+	/**
+	 * 获取用户列表信息
+	 * @return
+	 */
+	public List<User> selectUser(PageBean page);
+	
+	/**
+	 * 获取用户总条数
+	 * @return
+	 */
+	public int selectUserCount(SerchParam params);
+
+	
+	/**
+	 * 修改一条消息
+	 * @return 影响的行数
+	 */
+	public int updateMessage(Message message);
+	
+	/**
+	 * 添加一条消息
+	 * @return 影响的行数
+	 */
+	public int insertMessage(Message message);
+	
+	/**
+	 * 获取符合条件所有消息的总条数
+	 * @return 所有的消息条数
+	 */
+	public int selectMessageCount(SerchParam params);
+	
+	/**
+	 * 获取符合条件所有消息
+	 * @return 所有的消息
+	 */
+	public List<Message> selectMessageRecoreds(PageBean page);
+
+	
+	
+	/**
+	 * 获取系统的所有消息	(user为空的)
+	 * @param userid 用户id
+	 * @return 用户下所有的消息
+	 */
+	public List<Message> selectSysMessageRecoreds();
+	
+	/**
+	 * 根据信息id获取信息实体类
+	 * @param id 信息id
+	 * @return 信息实体类
+	 */
+	public Message selectUserMessageByid( Long id);
+	/**
+	 * 根据用户id获取该用户的所有消息
+	 * @param userid 用户id
+	 * @return 用户下所有的消息
+	 */
+	public List<Message> selectUserMessageRecoreds(String token);
+	/**
+	 * 获取用户消息
+	 * @param userid 用户id 
+	 * @param isread 1已读,2 未读
+	 * @return 用户消息集合
+	 */
+	public int selectUserMessageByisread(String token, Long isread);
+
+}

+ 158 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/MilkService.java

@@ -0,0 +1,158 @@
+package com.iamberry.app.face;
+
+import java.util.Date;
+import java.util.List;
+import java.util.Map;
+
+import com.iamberry.app.core.dto.RecordCountInfoDTO;
+import com.iamberry.app.core.dto.RecordDTO;
+import com.iamberry.app.core.entity.MilkDatetimeValue;
+import com.iamberry.app.core.entity.MilkImages;
+import com.iamberry.app.core.entity.MilkMakingRecord;
+import com.iamberry.app.core.entity.MilkPowderInfo;
+
+/**
+ * MilkService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:10
+ */
+
+public interface MilkService {
+
+	/**
+	 * setMilkMakingRecord
+	 *
+	 * @param makingRecord
+	 * @param token
+	 * @param recordId
+	 * @return
+	 */
+	public MilkMakingRecord setMilkMakingRecord(MilkMakingRecord makingRecord, String token);
+
+	/**
+	 * searchUserRecordsBytime
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @param startTime
+	 * @param endTime
+	 * @return Milk Making Record List
+	 */
+	public Map<String, List<RecordDTO>> searchUserRecordsByTime(Long userId, String dateStatus, String chosenDate,
+			String machineMac) ;
+	/**
+	 * searchUserRecordById
+	 *
+	 * @author Moon Cheng
+	 * @param recordId
+	 * @return Milk Making Record Information
+	 */
+	public MilkMakingRecord searchUserRecordById(Long recordId);
+
+	/**
+	 * getTotalMilkVolumeMadeByUser
+	 *
+	 * @author Moon Cheng
+	 * @param userId
+	 * @return
+	 */
+	public RecordCountInfoDTO getTotalMilkVolumeMadeByUser(Long userId) ;
+
+	/**
+	 * setMilkPowderInfo
+	 *
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo setMilkPowderInfo(MilkPowderInfo entity, String token) ;
+	/**
+	 * searchMilkPowderInfoByBarCode
+	 *
+	 * @author Moon Cheng
+	 * @param barcode
+	 * @return Milk Powder Information
+	 */
+	public MilkPowderInfo searchMilkPowderInfoByBarCode(String barcode) ;
+	/**
+	 * searchMilkPowderInfosByBrand
+	 *
+	 * @author Moon Cheng, Yin
+	 * @param brand
+	 * @return Milk Powder List
+	 */
+	public Map<String, List<String>> searchMilkPowderInfosByBrand(String brand) ;
+
+	/**
+	 * searchMilkPowderBrand
+	 *
+	 * @return Brand List
+	 */
+	public List<String> searchMilkPowderBrand() ;
+
+	/**
+	 * searchMilkInfoByBrandSeriesLevel
+	 *
+	 * @param brand
+	 * @param series
+	 * @param level
+	 * @return
+	 */
+	public MilkPowderInfo searchMilkInfoByBrandSeriesLevel(String brand, String series, String level);
+
+	// =====================================TuyaHistoryData======================================
+	/**
+	 * getLastRecordDate
+	 *
+	 * @return
+	 */
+	public Date getLastRecordDate() ;
+	/**
+	 * addRecordData
+	 *
+	 * @param devId
+	 * @param value
+	 * @param time
+	 */
+	public void addRecordData(String devId, String value, Long time, Long userID) ;
+	
+	/**
+	 * setMilkImages
+	 * @author Moon Cheng
+	 * @param entity
+	 * @param token
+	 * @return Milk Powder Information
+	 */
+	public void setMilkImages(MilkImages images) ;
+	
+	/**
+	 * 获取冲奶记录,根据时间统计某一天
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	//public List<MilkDatetimeValue> getMilkRecordByTime(String mac, String time);
+	
+	/**
+	 * 获取冲奶记录,根据日期统计某个月
+	 * @param mac
+	 * @param date
+	 * @return
+	 * @author 献
+	 * @Time   2016年12月12日
+	 */
+	//public List<MilkDatetimeValue> getMilkRecordByDate(String mac, String date);
+	
+	/**
+	 * 通过barcode查询奶粉信息
+	 *
+	 * @author Moon Cheng
+	 * @param barCode
+	 * @return
+	 */
+	public MilkPowderInfo selectMilkPowderByBar(String barcode);
+}

+ 154 - 0
iamberry-app-interface/src/main/java/com/iamberry/app/face/UserService.java

@@ -0,0 +1,154 @@
+package com.iamberry.app.face;
+
+import java.util.List;
+
+import com.iamberry.app.core.dto.RemoteIpInfoDTO;
+import com.iamberry.app.core.dto.UserDTO;
+import com.iamberry.app.core.entity.User;
+
+/**
+ * UserService
+ *
+ * @author Moon Cheng
+ * @date 2016年3月23日 上午11:33:29
+ */
+
+public interface UserService {
+	
+	
+	public User validateUserToken(String token);
+
+	/**
+	 * register
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param password
+	 * @return User Information
+	 */
+	public User register(String phone, String password, String ip) ;
+
+	/**
+	 * thirdPartBindingPhone
+	 *
+	 * @param phone
+	 * @param openId
+	 * @return
+	 */
+	public User thirdPartBindingPhone(String phone, String openId) ;
+	/**
+	 * findById
+	 *
+	 * @param id
+	 * @return User
+	 */
+	public User findById(Long id);
+
+	/**
+	 * login
+	 *
+	 * @param phone
+	 * @param password
+	 * @param userAgent
+	 * @return
+	 */
+	public Object login(String phone, String password) ;
+
+	/**
+	 * thirdPartLogin
+	 *
+	 * @param openId
+	 * @param extType
+	 * @param extName
+	 * @param extPicture
+	 * @return
+	 */
+	public User thirdPartLogin(String openId, String extType, String extName, String extPicture, String ip) ;
+
+	/**
+	 * updateUserInfo
+	 *
+	 * @param user
+	 * @param token
+	 * @return
+	 */
+	public User updateUserInfo(User user, String token) ;
+
+	/**
+	 * updateDisplayPicture
+	 *
+	 * @author Moon Cheng
+	 * @param base64
+	 * @param token
+	 * @return
+	 */
+	public String updateDisplayPicture(String base64, String token) ;
+	/**
+	 * changePhone
+	 *
+	 * @author Moon Cheng
+	 * @param phone
+	 * @param token
+	 * @return
+	 */
+	public User changePhone(String phone, String token) ;
+	/**
+	 * resetPassWord
+	 *
+	 * @param oldPassword
+	 * @param newPassword
+	 * @param token
+	 * @return
+	 */
+	public int changePassword(String oldPassword, String newPassword, String token) ;
+	/**
+	 * changePassWord
+	 *
+	 * @param username,
+	 *            newPassword
+	 * @param session
+	 * @return int
+	 */
+	public int resetPassWord(String username, String newPassword) ;
+
+	public UserDTO tuyaConnect(User user) ;
+
+	/**
+	 * getStartPage
+	 *
+	 * @return String
+	 */
+	public String getStartPage() ;
+	/**
+	 * getLocation
+	 *
+	 * @param ip
+	 * @return String
+	 */
+	public RemoteIpInfoDTO getLocation(String ip) ;
+
+	/**
+	 * getApkVersion
+	 *
+	 * @return
+	 */
+	public String getApkVersion();
+	
+	/**
+	 * selectUserAvator
+	 *
+	 * @param id
+	 * @return String
+	 */
+	public String selectUserAvator(Long id);
+	
+	/**
+	 * selectUserByUsername
+	 *
+	 * @param username
+	 * @return User Information
+	 */
+	public User selectUserByUsername(String username);
+	
+	//public List<User> getAll(int start, int end);
+}

BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/CodeService.class


BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/LogService.class


BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/MachineService.class


BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/MessageService.class


BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/MilkService.class


BIN=BIN
iamberry-app-interface/target/classes/com/iamberry/app/face/UserService.class


BIN=BIN
iamberry-app-interface/target/iamberry-app-interface-1.0.0.jar


+ 5 - 0
iamberry-app-interface/target/maven-archiver/pom.properties

@@ -0,0 +1,5 @@
+#Generated by Maven
+#Tue Jan 10 14:55:17 CST 2017
+version=1.0.0
+groupId=com.iamberry
+artifactId=iamberry-app-interface

+ 0 - 0
iamberry-app-interface/target/maven-status/maven-compiler-plugin/compile/default-compile/createdFiles.lst


+ 6 - 0
iamberry-app-interface/target/maven-status/maven-compiler-plugin/compile/default-compile/inputFiles.lst

@@ -0,0 +1,6 @@
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\UserService.java
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\LogService.java
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\CodeService.java
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\MachineService.java
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\MessageService.java
+E:\xiangmu\iamberry-app-interface\src\main\java\com\iamberry\app\face\MilkService.java

+ 0 - 0
iamberry-app-interface/target/maven-status/maven-compiler-plugin/testCompile/default-testCompile/inputFiles.lst